Unable to get data to display on DBv2 chart

I need assistance in determining why my data is not being displayed on the chart. Here is my data object:

[{"pop":100,"time":0},{"pop":100,"time":1},{"pop":100,"time":2},{"pop":100,"time":3},{"pop":93,"time":4},{"pop":0,"time":5},{"pop":0,"time":6}]

Here is the screenshot of my chart settings

The chart widget is unable to interpret your "time" values 1, 2, 3, 4, 5, 6 as valid timescale values.
Change the x axis type to Linear.

Your 'time' data is not a timescale value. Set it to 'linear' and it works

Ok if my x-axis values were “Mon”, “Tues”, “Wed” would I then set it to Timescale or leave it Linear?

What happened when you tried it?

Set it as 'Categorical' Only use 'Timescale' if your x axis is in epoch times (Timestamps must be in milliseconds (ms)).

X-Axis Type: Choose between a "Timescale" (for time-based data), "Linear" (for numerical data), or "Categorical" (for non-numeric data). You'll notice that some x-axis types are only available for certain chart types.

Note if you send timestamps and set X Axis Type to 'Timescale' you can then show it in various formats as defined by the Format field

HH:mm:ss | HH:mm | YYYY-MM-DD | DD/MM | dd HH:mm | Custom | Auto Defines how the values are displayed on the axis, when X-Axis type is 'timescale'. See here for an overview of all available Luxon tokens.

@Buckskin … thanks for verifying my understanding. Concerning the x-axis timestamp, if I want to format the field would I include something like this in payload: ui_control: { "xformat": "HH:MM" }

No, you have to define it in the chart node. The only dynamic for the chart node is 'Action'

Have a look at Chart ui-chart | Node-RED Dashboard 2.0 for all the info on the chart node.

It seems that you cannot have 'categorical' x axis for a line chart, only timestamp or linear, unlike the old dashboard with did support this. See also Flowfuse Dashboard line chart using categorical x axis values, which I am hoping someone will produce an answer for.

@Colin … well that explains the problem I’m having with my 2nd chart where I’m using the day of the week (i.e., Mon, Tue, Wed) as the x-axis value but it is not displaying them.

@Buckskin … where in the chart node can I set the x-axis format. I don’t see any field with that designation.

Thanks for the screenshot… issue was on my end… I was looking at a bar chart. :slight_smile: