Migrating from Dashboard to Dashboard2 with data in Influx

This what I have in Dashboard. I am trying to convert this to Dashboard2. Help on configuring the Dashboard2/Chart node correctly.


This the data feeding the chart from InfluxDB after converting into an array... There are 5 temperatures series, the arrays have timescale and temp

2/16/2025, 11:31:46 AMnode: debug 39msg.payload : array[1]

array[1]
0: object
series: array[5]
0: "Barn Tack Room"
1: "Barn Thermostat"
2: "House Sensor"
3: "Outside Pumpshed"
4: "Outside Sensor"
data: array[5]
0: array[169]
[0 … 9]
0: object
x: 1739131200000
y: 56.29999999999999
1: object
x: 1739134800000
y: 55.89999999999999
2: object
x: 1739138400000
y: 55.90000000000001

This is the data straight from InfluxDB, using the values that are bold
2/16/2025, 1:02:27 PMnode: From InfluxDBmsg : Object
object
payload: array[485]
[0 … 9]
0: object
result: "_result"
table: 0
_start: "2025-02-15T21:02:28.207282751Z"
_stop: "2025-02-16T21:02:28.207282751Z"
_time: "2025-02-15T21:20:00Z"
_value: 57.6
_field: "decimal"
_measurement: "temperature"
tag1: "Barn"
tag2: "Tack Room"
1: object
result: "_result"
table: 0
_start: "2025-02-15T21:02:28.207282751Z"
_stop: "2025-02-16T21:02:28.207282751Z"
_time: "2025-02-15T21:50:00Z"
_value: 57.6
_field: "decimal"
_measurement: "temperature"
tag1: "Barn"
tag2: "Tack Room"
2: object

Ok, I have been working on this. It appears that using the data from InfluxDB gets the chart to display. Now I can trying to figure out how to format the X axis.

ok, I figured it all out. I will leave so it might help others.
So a recap -
use the data straight from InfluxDB.
You might need to combine tags, I did.
Use the "key" for series, x and y values.
here is the code I used to combine tags, use a function node. There might be better ways but I could figure out how to do it in the Chart node, which would have been nice.

let arr = msg.payload;  // Assuming the array is in msg.payload

for (let i = 0; i < arr.length; i++) {
    arr[i].combinedTag = arr[i].tag1 + " " + arr[i].tag2;  // Combine tag1 and tag2
}

msg.payload = arr;
return msg;
1 Like