I would be really appreciative for some help on how to do this....
I am trying to change the chart label with a switch.
Trying to follow this thread, I have put the msg.topic in the chart label field.
I then change the msg.payload (from the switch) to msg.topic.
I found that I needed to delete msg.payload otherwise it will get plotted on the graph. (And distort the data)
Here is how it looks.
Here is the flow as you see it.
[{"id":"1db2e2c0.c00cfd","type":"ui_switch","z":"fa1bd60e.5b6d3","name":"","label":"switch","tooltip":"","group":"aaf2913b.d4fb2","order":12,"width":0,"height":0,"passthru":true,"decouple":"false","topic":"","style":"","onvalue":"6559","onvalueType":"str","onicon":"","oncolor":"","offvalue":"6543","offvalueType":"str","officon":"","offcolor":"","x":370,"y":2360,"wires":[["d788e3b7.9dd4"]]},{"id":"d788e3b7.9dd4","type":"change","z":"fa1bd60e.5b6d3","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":2360,"wires":[["2eb581c9.f1164e"]]},{"id":"2eb581c9.f1164e","type":"change","z":"fa1bd60e.5b6d3","name":"","rules":[{"t":"delete","p":"payload","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":740,"y":2360,"wires":[["34929f9c.2a704"]]},{"id":"34929f9c.2a704","type":"ui_chart","z":"fa1bd60e.5b6d3","name":"radio","group":"7fb7ae04.feeca","order":2,"width":7,"height":4,"label":"{{msg:topic}}","chartType":"line","legend":"false","xformat":"HH:mm","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"15","removeOlderPoints":"","removeOlderUnit":"60","cutout":0,"useOneColor":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"outputs":1,"x":910,"y":2360,"wires":[[]]},{"id":"a6763656.1d7948","type":"inject","z":"fa1bd60e.5b6d3","name":"data to plot","topic":"","payload":"22","payloadType":"num","repeat":"1","crontab":"","once":false,"onceDelay":0.1,"x":750,"y":2300,"wires":[["34929f9c.2a704"]]},{"id":"aaf2913b.d4fb2","type":"ui_group","z":"","name":"SDR VFO A - San Francisco Memory Bank","tab":"3dfdfe5c.067752","order":3,"disp":true,"width":"7","collapse":false},{"id":"7fb7ae04.feeca","type":"ui_group","z":"","name":"Reciver Status","tab":"3dfdfe5c.067752","order":1,"disp":false,"width":"15","collapse":false},{"id":"3dfdfe5c.067752","type":"ui_tab","z":"","name":"HF ACARS","icon":"flight","order":7,"disabled":false,"hidden":false}]
(Using the inject node to simulate the data, of course it comes from a live msg.payload).
EDIT. It works for 1 second. Each time I flip the switch, the new title shows for 1 second then goes blank.