Howto organize data for multiline chart node

hello guys howto organize data array from modbus for multi line chart node

This example may help, .

[{"id":"124314406c3b2ed1","type":"inject","z":"d1395164b4eec73e","name":"modbus output","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[1,2,3,4]","payloadType":"json","x":240,"y":1440,"wires":[["d22b91465c69afc2"]]},{"id":"d22b91465c69afc2","type":"split","z":"d1395164b4eec73e","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":410,"y":1440,"wires":[["5cbdc14624bbaf6d"]]},{"id":"5cbdc14624bbaf6d","type":"switch","z":"d1395164b4eec73e","name":"","property":"parts.index","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"},{"t":"eq","v":"1","vt":"num"},{"t":"eq","v":"2","vt":"num"},{"t":"eq","v":"3","vt":"num"}],"checkall":"true","repair":false,"outputs":4,"x":570,"y":1440,"wires":[["8b55bc58faf4d034"],["b5bfc7c22e621dd5"],["43b01b58d669f399"],["1f2dda24ebefe13c"]]},{"id":"8b55bc58faf4d034","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"name1","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":1420,"wires":[["2c73180f2a9267ab","e595c7a0ddb1ab5d"]]},{"id":"b5bfc7c22e621dd5","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"name2","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":1460,"wires":[["d6de67097e0f6852","e595c7a0ddb1ab5d"]]},{"id":"43b01b58d669f399","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"name3","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":1500,"wires":[["3577589115a178a7","e595c7a0ddb1ab5d"]]},{"id":"1f2dda24ebefe13c","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"name4","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":1540,"wires":[["a65f7bc30c953c72","e595c7a0ddb1ab5d"]]},{"id":"2c73180f2a9267ab","type":"ui_gauge","z":"d1395164b4eec73e","name":"","group":"4f791fdc1745d3d9","order":3,"width":0,"height":0,"gtype":"gage","title":"{{msg.topic}}","label":"units","format":"{{msg.payload}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":910,"y":1420,"wires":[]},{"id":"e595c7a0ddb1ab5d","type":"ui_chart","z":"d1395164b4eec73e","name":"","group":"4f791fdc1745d3d9","order":7,"width":0,"height":0,"label":"chart","chartType":"line","legend":"false","xformat":"HH:mm:ss","interpolate":"linear","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":1,"removeOlderPoints":"500","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"className":"","x":910,"y":1380,"wires":[[]]},{"id":"d6de67097e0f6852","type":"ui_gauge","z":"d1395164b4eec73e","name":"","group":"4f791fdc1745d3d9","order":3,"width":0,"height":0,"gtype":"gage","title":"{{msg.topic}}","label":"units","format":"{{msg.payload}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":910,"y":1460,"wires":[]},{"id":"3577589115a178a7","type":"ui_gauge","z":"d1395164b4eec73e","name":"","group":"4f791fdc1745d3d9","order":3,"width":0,"height":0,"gtype":"gage","title":"{{msg.topic}}","label":"units","format":"{{msg.payload}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":910,"y":1500,"wires":[]},{"id":"a65f7bc30c953c72","type":"ui_gauge","z":"d1395164b4eec73e","name":"","group":"4f791fdc1745d3d9","order":3,"width":0,"height":0,"gtype":"gage","title":"{{msg.topic}}","label":"units","format":"{{msg.payload}}","min":0,"max":10,"colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","diff":false,"className":"","x":910,"y":1540,"wires":[]},{"id":"4f791fdc1745d3d9","type":"ui_group","name":"micro","tab":"c954274bbed7292e","order":1,"disp":false,"width":"18","collapse":false,"className":""},{"id":"c954274bbed7292e","type":"ui_tab","name":"Solar","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

1 Like

Thank you, working!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.