Hi, this is the exported code. I've talked to my peers and we tried everything, it doesn't make sense and looked everywhere on the web. I am using a pathfile from my C drive.
Also I am testing a file that looks like this:
13:53 127.96
13:53 24.65
13:53 24.49
13:53 24.9
Below is the code. Nothing here makes any sense, I have no working example and cannot see a chart.
[
{
"id": "6db4358edc7b4457",
"type": "tab",
"label": "graph csv",
"disabled": false,
"info": ""
},
{
"id": "e3866b5b6346eb39",
"type": "inject",
"z": "6db4358edc7b4457",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 160,
"y": 260,
"wires": [
[
"e86d09d18c0b7c89"
]
]
},
{
"id": "716fe4e286cfc31d",
"type": "csv",
"z": "6db4358edc7b4457",
"name": "",
"sep": "\\t",
"hdrin": false,
"hdrout": "none",
"multi": "mult",
"ret": "\\n",
"temp": "x,y",
"skip": "0",
"strings": true,
"include_empty_strings": false,
"include_null_values": false,
"x": 388,
"y": 160,
"wires": [
[
"9f367c358a0f5f4b"
]
]
},
{
"id": "9f367c358a0f5f4b",
"type": "function",
"z": "6db4358edc7b4457",
"name": "Format data for chart",
"func": "for(let i = 0; i< msg.payload.length; i++){\n let time_parts = msg.payload[i].x.split(\":\");\n msg.payload[i].x = (Number(time_parts[0]) * 3600000) +(Number(time_parts[1]) * 60000) + (i *10000)\n}\n\n\nmsg.payload = [{\n \"series\":[\"temp\"],\n \"data\":[msg.payload],\n \"labels\":[]\n}];\n\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 600,
"y": 160,
"wires": [
[
"39434efb498c3b99",
"a1c0b3c99da7c008"
]
]
},
{
"id": "39434efb498c3b99",
"type": "debug",
"z": "6db4358edc7b4457",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 910,
"y": 120,
"wires": []
},
{
"id": "a1c0b3c99da7c008",
"type": "ui_chart",
"z": "6db4358edc7b4457",
"name": "",
"group": "160e81fb.f1c86e",
"order": 12,
"width": "18",
"height": "6",
"label": "",
"chartType": "line",
"legend": "false",
"xformat": "HH:mm:ss",
"interpolate": "linear",
"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,
"className": "",
"x": 920,
"y": 220,
"wires": [
[]
]
},
{
"id": "e86d09d18c0b7c89",
"type": "file in",
"z": "6db4358edc7b4457",
"name": "",
"filename": "pathfile",
"filenameType": "str",
"format": "lines",
"chunk": false,
"sendError": false,
"encoding": "none",
"allProps": false,
"x": 100,
"y": 80,
"wires": [
[
"716fe4e286cfc31d"
]
]
},
{
"id": "160e81fb.f1c86e",
"type": "ui_group",
"name": "File Browser",
"tab": "5b94a1d5e0dbd838",
"order": 3,
"disp": true,
"width": "18",
"collapse": false,
"className": ""
},
{
"id": "5b94a1d5e0dbd838",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]