Send csv to a line chart

Can someone tell me how can I pass now that .csv file and make a line chart with those values? can't find what function has to be writen. I guess somehow I have to define what goes on Y and what on X axies?

You don't state where this chart should be displayed.
I will assume the dashboard based on angular js.

if you read the help text for node-red-dashboard there is a link which explains the ui-chart node input data formats node-red-dashboard/Charts.md at master · node-red/node-red-dashboard · GitHub

You can use the csv node to create the x,y data, and a change node to create the payload array required, You do not need to write a function.

Example

[{"id":"172551ac1ab40d8a","type":"inject","z":"d1395164b4eec73e","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":620,"y":6480,"wires":[["e85cbb7a796aa2ba"]]},{"id":"e85cbb7a796aa2ba","type":"template","z":"d1395164b4eec73e","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"Time,Sensor\n1,16.259131946983107\n2,1.8228218735890755\n3,6.438627499528648\n4,25.768787339859813\n5,15.26994772882604\n6,39.88063722918977","output":"str","x":760,"y":6480,"wires":[["e0bbe0e97189e340"]]},{"id":"e0bbe0e97189e340","type":"csv","z":"d1395164b4eec73e","name":"","sep":",","hdrin":false,"hdrout":"none","multi":"mult","ret":"\\n","temp":"x,y","skip":"1","strings":true,"include_empty_strings":"","include_null_values":"","x":890,"y":6480,"wires":[["847ba43560e0c73c"]]},{"id":"847ba43560e0c73c","type":"change","z":"d1395164b4eec73e","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"temp","tot":"msg"},{"t":"set","p":"payload","pt":"msg","to":"[{\"series\":[\"readings\"],\"data\":[]}]","tot":"json"},{"t":"move","p":"temp","pt":"msg","to":"payload[0].data[0]","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":6480,"wires":[["e6abb1e4cfa61499"]]},{"id":"e6abb1e4cfa61499","type":"debug","z":"d1395164b4eec73e","name":"debug 2488","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1170,"y":6480,"wires":[]}]

P.S I moved this to its own topic as it really is a different question

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