Here is a draft... missing to check the date formatting.
[{"id":"970fc822.31fce8","type":"tab","label":"Chart - JSON data to Dashboard ","disabled":false,"info":""},{"id":"79849682.8825a8","type":"ui_chart","z":"970fc822.31fce8","name":"","group":"97aaf182.225e2","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,"colors":["#1f77b4","#aec7e8","#ff7f0e","#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5"],"useOldStyle":false,"x":570,"y":440,"wires":[[],[]]},{"id":"3f2550ef.b58d1","type":"inject","z":"970fc822.31fce8","name":"","topic":"","payload":"[]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":390,"y":440,"wires":[["79849682.8825a8"]]},{"id":"b9ddd55a.1cf7c8","type":"function","z":"970fc822.31fce8","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,"x":380,"y":380,"wires":[["79849682.8825a8","257eddab.303be2"]]},{"id":"257eddab.303be2","type":"debug","z":"970fc822.31fce8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":550,"y":380,"wires":[]},{"id":"c78080b.67f998","type":"watch","z":"970fc822.31fce8","name":"Watch chart1.txt","files":"C:\\Users\\OCM\\.node-red\\static\\nrfiles\\chart1.txt","recursive":"","x":180,"y":160,"wires":[["570b2237.64778c"]]},{"id":"713d8bbc.09f304","type":"debug","z":"970fc822.31fce8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","x":750,"y":260,"wires":[]},{"id":"d1e26603.e7dbe8","type":"file in","z":"970fc822.31fce8","name":"","filename":"","format":"lines","chunk":false,"sendError":false,"x":510,"y":160,"wires":[["43b3d747.2a1428"]]},{"id":"570b2237.64778c","type":"change","z":"970fc822.31fce8","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":[["d1e26603.e7dbe8"]]},{"id":"43b3d747.2a1428","type":"json","z":"970fc822.31fce8","name":"","property":"payload","action":"obj","pretty":false,"x":270,"y":260,"wires":[["8b709565.39bc08"]]},{"id":"8b709565.39bc08","type":"join","z":"970fc822.31fce8","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":410,"y":260,"wires":[["6da9de2b.4ea93"]]},{"id":"6da9de2b.4ea93","type":"function","z":"970fc822.31fce8","name":"Build Data array","func":"function 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;","outputs":1,"noerr":0,"x":560,"y":260,"wires":[["713d8bbc.09f304","b9ddd55a.1cf7c8"]]},{"id":"97aaf182.225e2","type":"ui_group","z":"","name":"Group 1","tab":"b5acd512.0b8b98","disp":true,"width":"12","collapse":false},{"id":"b5acd512.0b8b98","type":"ui_tab","z":"","name":"Tab1","icon":"dashboard"}]
First node is the watch node. Each time you update this file it will trigger our flow.
The second node will set msg.filename
that is required by the following node to read the file.
As Nick mentioned your file is not a CVS but a JSON file instead, so added a json node to convert the string to a javascript object.
The join node will combine all the file lines as an array to easy the data manipulation.
The function node will build a data array in the proper format for the chart (hopefully). This is the code inside:
function fixData(elem) {
return {"x" : elem.Timedate, "y":parseFloat(elem.Temp)};
}
let adata = msg.payload.map(fixData);
msg.data = adata;
return msg;
The remaining nodes are a kind of a boilerplate for drawing a chart from stored data (node-red-dashboard/Charts.md at master · node-red/node-red-dashboard · GitHub)
I need to take some extra time to fix the date format. This is preventing the chart from being displayed in the dashboard.