Assuming that you are using node-red-dashboard v1...
You need to send your data to the chart node in a specific format:
An array containing a single object with properties "series", "data" and "labels".
- "series" is an array of the names of lines on the chart. For a single line, just one element in the array.
- "data" is an array of arrays, one array per line on the chart. Each array element is an object with x and y properties to define the points on the line.
- "labels" - Actually I'm not sure what labels does, but it is an array of strings, in my experience always an array of one element, an empty string.
[{
"series": ["Series Name"],
"data": [
[{ "x": 1504029634400, "y": 7 },
{ "x": 1504029637959, "y": 7 },
{ "x": 1504029640317, "y": 7 }
]
],
"labels": [""]
}]
You can make the task a bit simpler by tweeking your SQL select statement to return an array of objects with x and y properties - the heart of the "data" array (not tested)
Instead of SELECT timestamp, temp FROM table
SELECT timestamp AS x, temp AS y FROM table
[{"x":1691538694000,"y":"91.63"},{"x":1691538699000,"y":"91.67"},{"x":1691538705000,"y":"91.74"},{"x":1691538712000,"y":"91.76"},{"x":1691538716000,"y":"91.76"}]
Then feed the SQLite output into a function node to format it for the chart
msg.payload = [{"series":["Temperature"], "data": [msg.payload], "labels":[""]}]
return msg;
The resulting chart