3 Replies Latest reply on Nov 6, 2015 4:28 PM by aanjan RSS
    bsmith Apprentice

    Creating a Thermometer from a Shape Widget

     

    I want to create a basic thermometer.  That is, take a shape widget and adjust its height (and color) based on input data stream. The result will be something like this with the shape being that in red (it can be a rectangle, doesn't need the bulb at the bottom) and the height representing the level to which temperature has risen or fallen.  In this example 68% F. 

    Seems I can’t bind much to a shape dynamically to make it grow or shrink based on input data.  Any pointers to documentation or examples?  Thanks.

     

      • Re: Creating a Thermometer from a Shape Widget
        aanjan Heavyweight Champ

        Beck, you should be able to achieve this with State Formatting and Dynamic Fill. Here is a very simple way to test this is - add a Slider and a Shape widget to a Mashup. Bind the Slider 'value' to Shape's 'data'. Now, in the Shape widget's properties, click on 'EnableDynamicFill' and then click on ShapeFormatting. Here you can customize the State-based Formatting. For example, red when below 40, yellow when between 40-60 and green when above 60. Now when you view the Mashup, and move the Slider, the Shape should grow/ change colors in real time.