Chart Dashboard 2.0

Dashboard 2.0 is not backward compatible.

One of the joys, and big changes we made for of Dashboard 2.0, is that you don't need to separate and pre-format your data.

Instead of having multiple arrays, all duplicating data as you have it currently, you can just use the output from SQL directly, and have a single array containing the relevant data in each object, e.g:

[{
    "DateTime": "2024-06-17 14:23:24"
    "Carbon Monoxide": 1
    "Oxygen": 20,
    "Light Intensity": 134,
    "Temperature": 29.3,
    "Humidity": 45
}, 
...]

Then, on the options of your chart, choose series type to be "JSON", and define each of your series there:

You can read more about this property here: Chart ui-chart | Node-RED Dashboard 2.0