grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
63.87k stars 11.96k forks source link

[FeatureRequest] Disable Auto Sorting on Pie Chart #82972

Open gelicia opened 7 months ago

gelicia commented 7 months ago

Discussed in https://github.com/grafana/grafana/discussions/49689

Originally posted by **Vollbrecht** May 26, 2022 Currently the Pie chart panel auto sorts all values in a clock wise manner, in a descending order. If one uses multiple Pie charts the it starts to look out of place. Here is an example : ![Screenshot from 2022-05-26 13-57-24](https://user-images.githubusercontent.com/12041081/170484523-cc8b147f-073b-4f0c-9589-2011f0997fab.png) It would be nice to have a fixed ordering, that doesn't sort automatically. This would also eliminate the extra need for an tooltip ordering in the Pie chart.
alkanen commented 7 months ago

Having a "sort order" dropdown box would be nice, with e.g. "alphabetical (desc)", "alphabetical (asc)" and larger->smaller/smaller->larger as options. Perhaps more, but those are the obvious ones I can think of right now.

Craig-R-Holmes commented 5 months ago

It would also be good to have a sort order option of NONE and rely on the order of the data.

Been scratching my head for half an hour on why my SQL query was not putting "Aggregate Unlisted" at the bottom of the list:

image

Then I realised the returned data is correct, and it's the visualisation that is messing about with it.

I think taking the data as it is presented to the visualisation, rather than arbitrarily changing the data would be a good option.

Thanks

emrys90 commented 1 month ago

+1, I really want the ability to have sorting based on the order of the query data

fburel commented 1 day ago

+1 When presenting data, it sometimes makes sens to have a fixed order : i.e in a gaming system, representing the user by how much puzzle they solve, you want to have how many are in stage 1, 2, 3... in that order.