[{"id":"578e4ece.740fb","type":"tab","label":"Chart - JSON data to Dashboard ","disabled":false,"info":""},{"id":"dc77a1fa.1d179","type":"ui_chart","z":"578e4ece.740fb","name":"","group":"770538f1.66e878","order":0,"width":0,"height":0,"label":"{{msg.label}}","chartType":"line","legend":"true","xformat":"HH:mm:ss","interpolate":"step","nodata":"","dot":false,"ymin":"","ymax":"","removeOlder":"1","removeOlderPoints":"","removeOlderUnit":"3600","cutout":0,"useOneColor":false,"useUTC":false,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"outputs":1,"useDifferentColor":false,"x":550,"y":460,"wires":[["8134c85a.895e08"]]},{"id":"5b6c4e78.45035","type":"function","z":"578e4ece.740fb","name":"Setup payload","func":"series = [];\ndata = [];\nlabels = [];\n\nseries.push(\"Temp\");\nlabels.push(\"Temp\");\ndata.push(msg.data);\n\nmsg.payload = [{\"series\":series, \"data\":data,\"labels\": labels}];\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":380,"wires":[["ce576854.132428","dc77a1fa.1d179"]]},{"id":"ce576854.132428","type":"debug","z":"578e4ece.740fb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":690,"y":380,"wires":[]},{"id":"1676e907.849427","type":"watch","z":"578e4ece.740fb","name":"Watch chart1.txt","files":"/mnt/rssd/ment.csv","recursive":"","x":180,"y":160,"wires":[["64a684f6.f507dc"]]},{"id":"cb101826.98daa8","type":"debug","z":"578e4ece.740fb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","statusVal":"","statusType":"auto","x":850,"y":260,"wires":[]},{"id":"d49a4414.251d18","type":"file in","z":"578e4ece.740fb","name":"","filename":"/mnt/rssd/ment.csv","format":"lines","chunk":false,"sendError":false,"x":550,"y":160,"wires":[["65d3b86.4bad748","9b967ad2.875f98"]]},{"id":"64a684f6.f507dc","type":"change","z":"578e4ece.740fb","name":"Set filename","rules":[{"t":"set","p":"filename","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":350,"y":160,"wires":[["d49a4414.251d18"]]},{"id":"9b967ad2.875f98","type":"join","z":"578e4ece.740fb","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":350,"y":240,"wires":[["8a29dd98.b2c0f","26e24857.84ae18"]]},{"id":"26e24857.84ae18","type":"function","z":"578e4ece.740fb","name":"Build Data array","func":"\n\n/*\nfunction fixData(elem) {\n return {\"x\" : new Date(elem.Timedate).getTime(), \"y\":parseFloat(elem.Temp)};\n}\n\nlet adata = msg.payload.map(fixData);\nmsg.data = adata;\nreturn msg;\n\n\n\n*/","outputs":1,"noerr":0,"initialize":"","finalize":"","x":600,"y":240,"wires":[["cb101826.98daa8","5b6c4e78.45035"]]},{"id":"65d3b86.4bad748","type":"debug","z":"578e4ece.740fb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":800,"y":140,"wires":[]},{"id":"8134c85a.895e08","type":"debug","z":"578e4ece.740fb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":730,"y":460,"wires":[]},{"id":"8a29dd98.b2c0f","type":"debug","z":"578e4ece.740fb","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":350,"y":300,"wires":[]},{"id":"770538f1.66e878","type":"ui_group","name":"Group 1","tab":"b5acd512.0b8b98","order":1,"disp":true,"width":"12","collapse":false},{"id":"b5acd512.0b8b98","type":"ui_tab","name":"Tab1","icon":"dashboard"}]
It is almost works. I cant write a function.