Dashboard-2: bar chart x-axis data order

I have bar chart using "categorical" x-axis type and group-by "stacks". I use a function to pre-sort the data in the order that I want it to appear on the x-axis. This worked fine in dashboard-1, but not in dashboard-2: the x-axis values are not showing in the order I provide.

I have verified the data being passed into the chart node, and it is in the order I want -- but the chart is not using that order.

Here's the chart configuration:

The last few entries in the chart input, taken from node-red's debug output:

100: object
101: object
102: object
    type: "person"
    date: "2026-04-23T18:00:00.000Z"
    count: 17
    hour: "Thu 11:00 AM"
103: object
    type: "car"
    date: "2026-04-23T18:00:00.000Z"
    count: 6
    hour: "Thu 11:00 AM"
104: object
    type: "dog"
    date: "2026-04-23T18:00:00.000Z"
    count: 2
    hour: "Thu 11:00 AM"

And the chart itself - notice how the last few x-axis values do not match the input:

A colleague has discovered that we can force the chart to display in the expected order by providing dummy 0-value entries for any "missing" y-values for each x-value. Why should that be needed?