cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Creating a Thermometer from a Shape Widget

beck.smith
1-Newbie

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions

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.

View solution in original post

4 REPLIES 4

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.

Thanks, this worked.

I must have had something messed up in my original shape as I was unable to bind a value to it which was causing the confusion.

Once I started over with a fresh shape - all works well.

Thanks again!

No problem, glad to see it worked! You can possibly add another shape in the bottom, with the shape type set to circle (same data bound, EnableDynamicFill not checked) so as to give it a thermometer like display.

kt1
3-Visitor
3-Visitor
(To:Aanjan)

Can you show it step by step how to do it.

Thanks in advance.

Top Tags