I had a dashboard running in v7.5.2 using some Bar Gauge panels to display sales results. This server was recently updated to v8.2.2.
Data is retrieved from a SQL Server and SQL code has a sort at the end.
The resulting data when run in SQL Server is…
Time, Region, Value ---- ------ ----- time, Region3, £1000 time, Region5, £800 time, Region2, £700 time, Region1, £400 time, Region4, £100
The Bar Gauge Panel has been set to Time Series, despite the fact the data isn’t time based (Col1 is just to make it work). The reason we do this is because this allows us to use overrides to force the colour of the bars to ensure each region is always display by the same colour.
Looking at the raw data returned via Query Inspector it looks like Grafana switches each row as a new column and this appears to be in alphabetical order so displays like this…
Time, Region1, Region2, Region3, Region4, Region5 ---- ------- ------- ------- ------- ------- time, £400, £700, £1000, £100, £800
*NB: I never checked this in v7.5.2 so not sure if the column order was based on the retuned SQL data. It’s only now that I am trying to fix it I have found this.
If I go to the transforms then this only allows me to sort by Column so only offers me Region1, Region2, Region3 etc
If we change to Table format instead of Time series, the data does display correctly in the order returned from the database query, but we lose the colour overrides so can no longer set the region colours. The overrides now only give us the option of searching for columns (Region, Value) rather than row values (Region1, Region2 etc).
Something definitely changed, as it was working for 6 months, and then after an update (using yum update) to v8.2.2 it just stopped sorting.
Can anybody shed any light on this?