Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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.
Solved! Go to Solution.
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.
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.
Can you show it step by step how to do it.
Thanks in advance.