Smart Home Automation Forum
Color change on Measure Bar - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: Development (https://www.kincony.com/forum/forumdisplay.php?fid=4)
+--- Thread: Color change on Measure Bar (/showthread.php?tid=53)



Color change on Measure Bar - subas - 11-27-2020

Dear Admin.

How do I change the color (Green, Amber and Red) on the measuring bar as a picture? 
For example, if the temperature is between 30C to 35C it's green and when the temperature is between 36C to 40C is Amber and 41C onwards is Red.

I can't find what the code is and where to place it. 
Could you please show some examples?

Thank you
Subas


RE: Color change on Measure Bar - admin - 11-27-2020

is this part in Node-Red?


RE: Color change on Measure Bar - admin - 11-27-2020

All four colors for stripes can be customized. In addition, there is three options to modify the colors of the level bar. Multiple segments - Colors tied to stripes according to sector values. Single color bar - Single value-based color for all active stripes. Interpolated colors - Colors interpolated from normal to high color. If you choose Multiple segments for your stripe colors, you can optionally use the Peak mode.
       


RE: Color change on Measure Bar - subas - 11-29-2020

Dear Admin.

I understand the level part in Node-Red. 
But where do you key in the criteria if I want to change the color based on specific criteria?

28 deg to 35 deg color shown on the level is Green
36 deg to 40 deg color shown on the level is Yellow
41 deg and above color shown on the level is Red

Please advise as the screenshot you have provided does not show where to insert the above criteria?

Regards
Subas


RE: Color change on Measure Bar - admin - 11-29-2020

Examples of msg.control usage
msg.control = {min:10, max:80} to change min and max values. msg.control = {min:10, max:80, seg1:30, seg2:60} to change min, max and segments all together. msg.control = {seg2:60} to change high segment value only.

details about level node:
https://flows.nodered.org/node/node-red-contrib-ui-level


RE: Color change on Measure Bar - subas - 12-01-2020

Dear Admin.

Thank you for all the explanation. 
I will try it out and feedback if any issues.