Ign 8.0 Vision Bar chart changing query sequence order for hour by hour

I’m trying to show a bar chart hour by hour, I’m using a named query ordered by t_stamp. When looking at the order, everything is correct, but when the chart is rendered the order is changed.

How can I fix this? The right side of the chart should show the most recent hour ‘10’ but is showing 22?
Running the Query in SQL the results are in the correct aces order.


Try returning the hours column as strings, rather than numeric values - the chart is auto-sorting them for rendering.

This should return a string, but the same thing happens on the bar chart.

Select concat(‘H-’,datepart(hour,dt)) as hour, hbh from #tmp order by dt