Thanks for the advice
[
{
"id": "4483d1e2393def58",
"type": "tab",
"label": "Example",
"disabled": false,
"info": "",
"env": []
},
{
"id": "7c3db8cccb61bd31",
"type": "template",
"z": "4483d1e2393def58",
"name": "GOOD EXAMPLE",
"field": "payload",
"fieldType": "msg",
"format": "javascript",
"syntax": "mustache",
"template": "[{\"Fecha - Hora\":\"10/03/2024 00:08\",\"T1\":81.43,\"T2\":81.62,\"T3\":92.05,\"T4\":89.41,\"T5\":89.9,\"T6\":95.97},{\"Fecha - Hora\":\"10/03/2024 00:18\",\"T1\":82.18,\"T2\":81.57,\"T3\":93.98,\"T4\":90.53,\"T5\":90.3,\"T6\":98.36},{\"Fecha - Hora\":\"10/03/2024 00:28\",\"T1\":82.53,\"T2\":81.53,\"T3\":94.54,\"T4\":90.18,\"T5\":90.35,\"T6\":95.94},{\"Fecha - Hora\":\"10/03/2024 00:38\",\"T1\":82.39,\"T2\":81.29,\"T3\":93.96,\"T4\":91.13,\"T5\":90.52,\"T6\":97.98},{\"Fecha - Hora\":\"10/03/2024 00:48\",\"T1\":81.36,\"T2\":81.27,\"T3\":92.74,\"T4\":90.03,\"T5\":90.27,\"T6\":96.05}]",
"output": "json",
"x": 590,
"y": 280,
"wires": [
[
"9149406bd5d212ba"
]
]
},
{
"id": "9149406bd5d212ba",
"type": "function",
"z": "4483d1e2393def58",
"name": "CHART",
"func": "var chartData = {\n series: [],\n data: [], \n labels: [] \n};\nfor (var i = 1; i <= 6; i++) {\n var columnName = \"T\" + i;\n\n chartData.series.push(columnName);\n\n var seriesData = [];\n\n msg.payload.forEach(function (row) {\n var dataPoint = {\n x: row[\"Fecha - Hora\"],\n y: parseFloat(row[columnName]) \n };\n\n seriesData.push(dataPoint);\n });\n\n chartData.data.push(seriesData);\n}\n\nmsg.payload = [chartData];\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 840,
"y": 300,
"wires": [
[
"1a8b752a8e8ade35"
]
]
},
{
"id": "1a8b752a8e8ade35",
"type": "ui_chart",
"z": "4483d1e2393def58",
"name": "",
"group": "be853d70bd1c97e3",
"order": 58,
"width": 0,
"height": 0,
"label": "chart",
"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": 1010,
"y": 300,
"wires": [
[
"fc9f138bc88a5075"
]
]
},
{
"id": "70a86e8370030de9",
"type": "inject",
"z": "4483d1e2393def58",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 280,
"wires": [
[
"7c3db8cccb61bd31"
]
]
},
{
"id": "fc9f138bc88a5075",
"type": "debug",
"z": "4483d1e2393def58",
"name": "debug 28",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 1180,
"y": 300,
"wires": []
},
{
"id": "17a19b2d7441ec82",
"type": "template",
"z": "4483d1e2393def58",
"name": "BAD EXAMPLE",
"field": "payload",
"fieldType": "msg",
"format": "javascript",
"syntax": "mustache",
"template": "[{ \"Fecha - Hora\": \"13/03/2024 00:39\", \"T1\": 83.96, \"T2\": 85.68, \"T3\": 92.86, \"T4\": 90.95, \"T5\": 94.53, \"T6\": 102.05 }, { \"Fecha - Hora\": \"13/03/2024 00:49\", \"T1\": 84.05, \"T2\": 86.88, \"T3\": 92.26, \"T4\": 89.94, \"T5\": 97.81, \"T6\": 104.82 }, { \"Fecha - Hora\": \"13/03/2024 00:59\", \"T1\": 85.82, \"T2\": 88.95, \"T3\": 92.94, \"T4\": 90.51, \"T5\": 97.16, \"T6\": 103.42 }, { \"Fecha - Hora\": \"13/03/2024 01:09\", \"T1\": 85.42, \"T2\": 87.53, \"T3\": 94.57, \"T4\": 90.39, \"T5\": 96.59, \"T6\": 102.27 }]",
"output": "json",
"x": 580,
"y": 320,
"wires": [
[
"9149406bd5d212ba"
]
]
},
{
"id": "4c6b50ec4aa7c0ba",
"type": "inject",
"z": "4483d1e2393def58",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 320,
"wires": [
[
"17a19b2d7441ec82"
]
]
},
{
"id": "ef694fcbabe30cfc",
"type": "comment",
"z": "4483d1e2393def58",
"name": "Note:",
"info": "Here I have a \"good example\" that was\nfrom a .csv from 3 days ago that works correctly \nand a \"Bad example\" from a .csv from today",
"x": 270,
"y": 140,
"wires": []
},
{
"id": "be853d70bd1c97e3",
"type": "ui_group",
"name": "Pruebas de Gráficas",
"tab": "c92c58d9672674b5",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "c92c58d9672674b5",
"type": "ui_tab",
"name": "Prueba",
"icon": "dashboard",
"order": 11,
"disabled": false,
"hidden": false
}
]
Here I have a "good example" that was from a .csv from 3 days ago that works correctly and a "Bad example" from a .csv from today.
I still don't know what's going on, I see everything is the same but It just doesn't work.