Hey Guys
I need some of your expertise as I have very little with coding, trying to merge 2 arrarys so they can be shown on a graph. Have attach flow with sample data, i have managed to merge them but not in a way that will show both at the same time so i can compare the two on the same graph, i have searched through google and the forum and found lots of methods, but could find none to merge the series and setup the arrays. The flow i created at present will merge them but no graph, can show one at a time connecting the chart to the temple bypassing the join.
[
{
"id": "40490139.b2586",
"type": "inject",
"z": "955d7c60a74b88fb",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "pac",
"payload": "[{\"x\":1691958309,\"y\":11},{\"x\":1691958609,\"y\":18},{\"x\":1691958909,\"y\":30},{\"x\":1691959209,\"y\":40},{\"x\":1691959509,\"y\":51},{\"x\":1691959809,\"y\":63},{\"x\":1691960109,\"y\":72},{\"x\":1691960409,\"y\":81},{\"x\":1691960709,\"y\":96},{\"x\":1691961009,\"y\":129},{\"x\":1691961309,\"y\":169},{\"x\":1691961609,\"y\":202},{\"x\":1691961909,\"y\":275},{\"x\":1691962209,\"y\":359},{\"x\":1691962509,\"y\":415},{\"x\":1691962809,\"y\":464},{\"x\":1691963109,\"y\":548},{\"x\":1691963409,\"y\":607},{\"x\":1691963709,\"y\":648},{\"x\":1691964009,\"y\":646},{\"x\":1691964309,\"y\":673},{\"x\":1691964609,\"y\":701},{\"x\":1691964909,\"y\":805},{\"x\":1691965209,\"y\":861},{\"x\":1691965509,\"y\":895},{\"x\":1691965809,\"y\":918},{\"x\":1691966109,\"y\":945},{\"x\":1691966409,\"y\":967},{\"x\":1691966709,\"y\":991},{\"x\":1691967009,\"y\":1016},{\"x\":1691967309,\"y\":1037},{\"x\":1691967609,\"y\":1054},{\"x\":1691967909,\"y\":1076},{\"x\":1691968209,\"y\":1092},{\"x\":1691968509,\"y\":1111},{\"x\":1691968809,\"y\":1133},{\"x\":1691969109,\"y\":1150},{\"x\":1691969409,\"y\":1163},{\"x\":1691969709,\"y\":1180},{\"x\":1691970009,\"y\":1191},{\"x\":1691970309,\"y\":1203},{\"x\":1691970609,\"y\":1211},{\"x\":1691970909,\"y\":1229},{\"x\":1691971209,\"y\":1245},{\"x\":1691971509,\"y\":1255},{\"x\":1691971809,\"y\":1272},{\"x\":1691972109,\"y\":1282},{\"x\":1691972409,\"y\":1290},{\"x\":1691972709,\"y\":1303},{\"x\":1691973009,\"y\":1324},{\"x\":1691973309,\"y\":1340},{\"x\":1691973609,\"y\":1344},{\"x\":1691973909,\"y\":1351},{\"x\":1691974209,\"y\":1355},{\"x\":1691974509,\"y\":1351},{\"x\":1691974809,\"y\":1355},{\"x\":1691975109,\"y\":1365},{\"x\":1691975409,\"y\":1371},{\"x\":1691975709,\"y\":1447},{\"x\":1691976009,\"y\":1602},{\"x\":1691976309,\"y\":1766},{\"x\":1691976609,\"y\":1913},{\"x\":1691976910,\"y\":1916},{\"x\":1691977209,\"y\":1990},{\"x\":1691977509,\"y\":2063},{\"x\":1691977809,\"y\":1988},{\"x\":1691978109,\"y\":1984},{\"x\":1691978409,\"y\":1980},{\"x\":1691978709,\"y\":1984},{\"x\":1691979009,\"y\":2169},{\"x\":1691979309,\"y\":2164},{\"x\":1691979609,\"y\":1985},{\"x\":1691979909,\"y\":1991},{\"x\":1691980209,\"y\":1987},{\"x\":1691980509,\"y\":1990},{\"x\":1691980810,\"y\":2162},{\"x\":1691981109,\"y\":2157},{\"x\":1691981409,\"y\":1989},{\"x\":1691981709,\"y\":1985},{\"x\":1691982009,\"y\":1990},{\"x\":1691982309,\"y\":1995},{\"x\":1691982609,\"y\":2092},{\"x\":1691982909,\"y\":2062},{\"x\":1691983209,\"y\":1988},{\"x\":1691983509,\"y\":1992},{\"x\":1691983809,\"y\":1994},{\"x\":1691984109,\"y\":1988},{\"x\":1691984409,\"y\":1975},{\"x\":1691984710,\"y\":1946},{\"x\":1691985009,\"y\":1897},{\"x\":1691985309,\"y\":1561},{\"x\":1691985609,\"y\":1359},{\"x\":1691985909,\"y\":1158},{\"x\":1691986209,\"y\":1115},{\"x\":1691986509,\"y\":1058},{\"x\":1691986809,\"y\":954},{\"x\":1691987109,\"y\":924},{\"x\":1691987409,\"y\":889},{\"x\":1691987709,\"y\":795},{\"x\":1691988009,\"y\":1134},{\"x\":1691988309,\"y\":1059},{\"x\":1691988609,\"y\":744},{\"x\":1691988909,\"y\":699},{\"x\":1691989210,\"y\":586},{\"x\":1691989509,\"y\":702},{\"x\":1691989809,\"y\":714},{\"x\":1691990109,\"y\":724},{\"x\":1691990409,\"y\":576},{\"x\":1691990709,\"y\":497},{\"x\":1691991008,\"y\":498},{\"x\":1691991309,\"y\":582},{\"x\":1691991610,\"y\":560},{\"x\":1691991909,\"y\":571},{\"x\":1691992209,\"y\":480},{\"x\":1691992509,\"y\":348},{\"x\":1691992809,\"y\":356},{\"x\":1691993109,\"y\":328},{\"x\":1691993409,\"y\":303},{\"x\":1691993709,\"y\":279},{\"x\":1691994009,\"y\":219},{\"x\":1691994309,\"y\":202},{\"x\":1691994609,\"y\":186},{\"x\":1691994909,\"y\":142},{\"x\":1691995209,\"y\":111},{\"x\":1691995510,\"y\":56},{\"x\":1691995809,\"y\":63},{\"x\":1691996109,\"y\":64},{\"x\":1691996409,\"y\":49},{\"x\":1691996709,\"y\":38},{\"x\":1691997009,\"y\":27},{\"x\":1691997309,\"y\":20},{\"x\":1691997609,\"y\":14},{\"x\":1691997909,\"y\":10}]",
"payloadType": "json",
"x": 170,
"y": 100,
"wires": [
[
"c386cfe7a7db81c8"
]
]
},
{
"id": "55644378.d2d494",
"type": "join",
"z": "955d7c60a74b88fb",
"name": "",
"mode": "custom",
"build": "object",
"property": "payload",
"propertyType": "msg",
"key": "topic",
"joiner": "\\n",
"joinerType": "str",
"accumulate": false,
"timeout": "",
"count": "2",
"reduceRight": false,
"reduceExp": "",
"reduceInit": "",
"reduceInitType": "num",
"reduceFixup": "",
"x": 470,
"y": 160,
"wires": [
[
"19d1f9f7.86f8ce",
"a33ca4bba1eb8be4"
]
]
},
{
"id": "24e8532e.fd99bc",
"type": "inject",
"z": "955d7c60a74b88fb",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "pac1",
"payload": "[{\"x\":1691785570,\"y\":0},{\"x\":1691785576,\"y\":0},{\"x\":1691785809,\"y\":15},{\"x\":1691786109,\"y\":18},{\"x\":1691786409,\"y\":31},{\"x\":1691786709,\"y\":40},{\"x\":1691787009,\"y\":49},{\"x\":1691787309,\"y\":58},{\"x\":1691787609,\"y\":64},{\"x\":1691787909,\"y\":76},{\"x\":1691788209,\"y\":106},{\"x\":1691788509,\"y\":147},{\"x\":1691788809,\"y\":184},{\"x\":1691789109,\"y\":197},{\"x\":1691789409,\"y\":270},{\"x\":1691789709,\"y\":376},{\"x\":1691790009,\"y\":429},{\"x\":1691790309,\"y\":526},{\"x\":1691790609,\"y\":573},{\"x\":1691790909,\"y\":612},{\"x\":1691791209,\"y\":645},{\"x\":1691791509,\"y\":664},{\"x\":1691791809,\"y\":689},{\"x\":1691792109,\"y\":715},{\"x\":1691792409,\"y\":810},{\"x\":1691792709,\"y\":851},{\"x\":1691793009,\"y\":886},{\"x\":1691793309,\"y\":910},{\"x\":1691793609,\"y\":941},{\"x\":1691793909,\"y\":976},{\"x\":1691794209,\"y\":1006},{\"x\":1691794509,\"y\":1028},{\"x\":1691794809,\"y\":1056},{\"x\":1691795109,\"y\":1079},{\"x\":1691795409,\"y\":1102},{\"x\":1691795709,\"y\":1113},{\"x\":1691796009,\"y\":1133},{\"x\":1691796309,\"y\":1149},{\"x\":1691796609,\"y\":1165},{\"x\":1691796909,\"y\":1176},{\"x\":1691797209,\"y\":1192},{\"x\":1691797509,\"y\":1211},{\"x\":1691797809,\"y\":1221},{\"x\":1691798109,\"y\":1236},{\"x\":1691798409,\"y\":1249},{\"x\":1691798709,\"y\":1265},{\"x\":1691799009,\"y\":1275},{\"x\":1691799309,\"y\":1288},{\"x\":1691799609,\"y\":1293},{\"x\":1691799909,\"y\":1309},{\"x\":1691800208,\"y\":1316},{\"x\":1691800509,\"y\":1330},{\"x\":1691800809,\"y\":1339},{\"x\":1691801109,\"y\":1330},{\"x\":1691801409,\"y\":1347},{\"x\":1691801709,\"y\":1350},{\"x\":1691802009,\"y\":1366},{\"x\":1691802309,\"y\":1363},{\"x\":1691802609,\"y\":1368},{\"x\":1691802909,\"y\":1599},{\"x\":1691803209,\"y\":1754},{\"x\":1691803509,\"y\":1750},{\"x\":1691803809,\"y\":1736},{\"x\":1691804109,\"y\":1779},{\"x\":1691804409,\"y\":1789},{\"x\":1691804709,\"y\":1866},{\"x\":1691805009,\"y\":1997},{\"x\":1691805309,\"y\":1986},{\"x\":1691805609,\"y\":1987},{\"x\":1691805909,\"y\":1981},{\"x\":1691806209,\"y\":1988},{\"x\":1691806509,\"y\":1972},{\"x\":1691806809,\"y\":1986},{\"x\":1691807109,\"y\":1979},{\"x\":1691807409,\"y\":1956},{\"x\":1691807709,\"y\":1958},{\"x\":1691808009,\"y\":1958},{\"x\":1691808309,\"y\":1945},{\"x\":1691808609,\"y\":1945},{\"x\":1691808909,\"y\":1920},{\"x\":1691809209,\"y\":1898},{\"x\":1691809509,\"y\":1900},{\"x\":1691809809,\"y\":1888},{\"x\":1691810109,\"y\":1857},{\"x\":1691810409,\"y\":1847},{\"x\":1691810709,\"y\":1832},{\"x\":1691811009,\"y\":1787},{\"x\":1691811309,\"y\":1782},{\"x\":1691811609,\"y\":1746},{\"x\":1691811909,\"y\":1707},{\"x\":1691812209,\"y\":1673},{\"x\":1691812509,\"y\":1441},{\"x\":1691812810,\"y\":1147},{\"x\":1691813109,\"y\":1009},{\"x\":1691813409,\"y\":1108},{\"x\":1691813709,\"y\":1049},{\"x\":1691814009,\"y\":963},{\"x\":1691814309,\"y\":941},{\"x\":1691814609,\"y\":522},{\"x\":1691814909,\"y\":229},{\"x\":1691815209,\"y\":1214},{\"x\":1691815509,\"y\":1064},{\"x\":1691815809,\"y\":776},{\"x\":1691816109,\"y\":678},{\"x\":1691816409,\"y\":562},{\"x\":1691816708,\"y\":681},{\"x\":1691817009,\"y\":738},{\"x\":1691817309,\"y\":773},{\"x\":1691817609,\"y\":683},{\"x\":1691817909,\"y\":553},{\"x\":1691818209,\"y\":596},{\"x\":1691818510,\"y\":673},{\"x\":1691818809,\"y\":381},{\"x\":1691819109,\"y\":593},{\"x\":1691819409,\"y\":508},{\"x\":1691819709,\"y\":279},{\"x\":1691820009,\"y\":211},{\"x\":1691820309,\"y\":133},{\"x\":1691820609,\"y\":201},{\"x\":1691820909,\"y\":267},{\"x\":1691821209,\"y\":214},{\"x\":1691821509,\"y\":179},{\"x\":1691821809,\"y\":200},{\"x\":1691822109,\"y\":149},{\"x\":1691822409,\"y\":94},{\"x\":1691822709,\"y\":89},{\"x\":1691823009,\"y\":69},{\"x\":1691823309,\"y\":46},{\"x\":1691823609,\"y\":44},{\"x\":1691823909,\"y\":41},{\"x\":1691824209,\"y\":29},{\"x\":1691824509,\"y\":17},{\"x\":1691824809,\"y\":9},{\"x\":1691825109,\"y\":0}]",
"payloadType": "json",
"x": 170,
"y": 220,
"wires": [
[
"eb47eedbbb19b611"
]
]
},
{
"id": "a33ca4bba1eb8be4",
"type": "ui_chart",
"z": "955d7c60a74b88fb",
"name": "",
"group": "e0023fff.6f3a4",
"order": 30,
"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": "86400",
"cutout": 0,
"useOneColor": false,
"useUTC": true,
"colors": [
"#1f77b4",
"#aec7e8",
"#ff7f0e",
"#2ca02c",
"#98df8a",
"#d62728",
"#ff9896",
"#9467bd",
"#c5b0d5"
],
"outputs": 1,
"useDifferentColor": false,
"className": "",
"x": 490,
"y": 200,
"wires": [
[
"19d1f9f7.86f8ce"
]
]
},
{
"id": "c386cfe7a7db81c8",
"type": "json",
"z": "955d7c60a74b88fb",
"name": "",
"property": "payload",
"action": "str",
"pretty": false,
"x": 210,
"y": 140,
"wires": [
[
"65ccea3b5925d0fa"
]
]
},
{
"id": "eb47eedbbb19b611",
"type": "json",
"z": "955d7c60a74b88fb",
"name": "",
"property": "payload",
"action": "str",
"pretty": false,
"x": 210,
"y": 180,
"wires": [
[
"fcf70a1bcbc6911e"
]
]
},
{
"id": "65ccea3b5925d0fa",
"type": "template",
"z": "955d7c60a74b88fb",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "json",
"syntax": "mustache",
"template": "[{\n \"series\": [\n \"PAC\"\n ],\n \"data\": [\n {{{payload}}}\n \n ],\n \"labels\": [\n \"\"\n ]\n }\n]",
"output": "json",
"x": 340,
"y": 140,
"wires": [
[
"55644378.d2d494"
]
]
},
{
"id": "fcf70a1bcbc6911e",
"type": "template",
"z": "955d7c60a74b88fb",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "json",
"syntax": "mustache",
"template": "[{\n \"series\": [\n \"PAC1\"\n ],\n \"data\": [\n {{{payload}}}\n \n ],\n \"labels\": [\n \"\"\n ]\n }\n]",
"output": "json",
"x": 340,
"y": 180,
"wires": [
[
"55644378.d2d494"
]
]
},
{
"id": "e0023fff.6f3a4",
"type": "ui_group",
"name": "Web",
"tab": "3a6d7b89.06bd5c",
"order": 1,
"disp": false,
"width": "8",
"collapse": false,
"className": ""
},
{
"id": "3a6d7b89.06bd5c",
"type": "ui_tab",
"name": "PV",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": false
}
]
Below is a mock up of what I assume the output should look like
Thanks Dan