dynamic gauge min/max?

747 views
Skip to first unread message

Bobby Rutgers

unread,
Dec 7, 2017, 4:23:59 PM12/7/17
to Node-RED
hey everyone, I'm super new to this and I'm trying to setup a gauge with dynamic Min/Max settings, the values of which will be pulled from a file, That part I have working fine. From what I can see the newest version allows this? I just can't figure out how to implement it
something like button > function (with code to change the max) > gauge

from this page it seems that the functionality has been added, but I can't figure out how to control it.
https://github.com/node-red/node-red-dashboard/blob/master/config-fields.md

Le me know if this is possible, and how to do it. Thanks. Once I figure out that, it shouldn't be hard to figure out how to set a chart Ymin and Ymax axis externally as well.

Dave C-J

unread,
Dec 7, 2017, 5:15:32 PM12/7/17
to node...@googlegroups.com
Hi - here is a quick example

[{"id":"2f5869b3.8b1126","type":"ui_button","z":"17c6da83.e39e95","name":"","group":"1f76698f.f5de86","order":3,"width":0,"height":0,"passthru":false,"label":"Re-Max 100","color":"","bgcolor":"","icon":"","payload":"{\"max\":100}","payloadType":"json","topic":"","x":250,"y":200,"wires":[["2f39ef67.f7852"]]},{"id":"ff0a8c41.2aec2","type":"ui_button","z":"17c6da83.e39e95","name":"","group":"1f76698f.f5de86","order":4,"width":0,"height":0,"passthru":false,"label":"Re-Max 10","color":"","bgcolor":"","icon":"","payload":"{\"max\":10,\"ymax\":10}","payloadType":"json","topic":"","x":230,"y":240,"wires":[["2f39ef67.f7852"]]},{"id":"2f39ef67.f7852","type":"change","z":"17c6da83.e39e95","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"ui_control","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":196,"wires":[["ebf2072f.9ab1e8"]]},{"id":"ebf2072f.9ab1e8","type":"ui_gauge","z":"17c6da83.e39e95","name":"","group":"1f76698f.f5de86","order":2,"width":0,"height":0,"gtype":"gage","title":"Gauge","label":"units","format":"{{value}}","min":0,"max":"100","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":690,"y":200,"wires":[]},{"id":"1f76698f.f5de86","type":"ui_group","z":"","name":"Inputs","tab":"74731c4b.eda694","order":1,"disp":true,"width":"6"},{"id":"74731c4b.eda694","type":"ui_tab","z":"","name":"Charts","icon":"dashboard","order":2}]

Bobby Rutgers

unread,
Dec 8, 2017, 11:15:04 AM12/8/17
to Node-RED
Thank you Dave, With your example I was able to modify it to take a file input and push it to the max and yMax values of my gauge and chart. I appreciate your help.
Reply all
Reply to author
Forward
0 new messages