Dynamic label in gauge node

Hello I am trying to set dynamically the label of some gauges by injecting a string (i.e. "mylabel") in a, msg.topic using a change node. It is not working. Can someone provide a simple example with an inject node + change node + gauge node and modifying the label in gauge node?

note a succeed to change value, and gauge ranges too but not the label.

thanks a million.

What have you got Label set to in the Gauge nodes properties?

[{"id":"1c2d8063.ffd98","type":"ui_gauge","z":"66c7738a.9aedd4","name":"","group":"60dbb005.0de84","order":0,"width":0,"height":0,"gtype":"gage","title":"{{topic}}","label":"units","format":"{{value}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","x":556,"y":233,"wires":[]},{"id":"f2ad57c4.ab6818","type":"inject","z":"66c7738a.9aedd4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":143,"y":118,"wires":[["caa0fea4.2d07e"]]},{"id":"caa0fea4.2d07e","type":"change","z":"66c7738a.9aedd4","name":"10 nm","rules":[{"t":"set","p":"payload","pt":"msg","to":"10","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":326,"y":136,"wires":[["1c2d8063.ffd98"]]},{"id":"3183b7fe.17aea","type":"change","z":"66c7738a.9aedd4","name":"label1","rules":[{"t":"set","p":"topic","pt":"msg","to":"label1","tot":"str"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":318,"y":228,"wires":[["1c2d8063.ffd98"]]},{"id":"8c00a1bc.87b528","type":"change","z":"66c7738a.9aedd4","name":"Label2","rules":[{"t":"set","p":"topic","pt":"msg","to":"Label2","tot":"str"},{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":321,"y":324,"wires":[["1c2d8063.ffd98"]]},{"id":"16d2b4a6.7d73b3","type":"inject","z":"66c7738a.9aedd4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":155,"y":228,"wires":[["3183b7fe.17aea"]]},{"id":"1b719264.6c406e","type":"inject","z":"66c7738a.9aedd4","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":173,"y":336,"wires":[["8c00a1bc.87b528"]]},{"id":"60dbb005.0de84","type":"ui_group","z":"","name":"control","tab":"1d3f043a.f4b0d4","order":1,"disp":true,"width":"6","collapse":false},{"id":"1d3f043a.f4b0d4","type":"ui_tab","name":"Tab 1","icon":"dashboard","order":1}]

Hello, thanks for the example which is perfectly working. I could get my flow working now.
thank you.

pretty sure the solution is in post 2 not post 3...:laughing:

sorry for "solution" in post 3. My mistake.

another question, how to set automatically "units" field in gauge. I tried by sending a json {"unit":"celcuis"} in topic and I set the units field in gauge to be {{unit}} (I tried {{topic.unit}} too}}
but it is not working. do you have any ideas?

As far I know, there is no any legal way to change units field on fly.

And again, I was wrong :slight_smile:

image