mirror of
https://github.com/grafana/grafana.git
synced 2025-09-17 07:32:52 +08:00

* Add PieSortOption. * Add sorting options to pie chart panel options. * Fix that sorting is not part of the panel options. * Implement custom sorting in piechart and piechart legend. * Update piechart documentation * Fix default and clockwise/counterclockwise confusion. * refactor(piechart): use asc/desc terminology instead of clockwise * fix(piechart): simplify comparator sort, avoid a/b swap mutation * fix(pichart): remove redundant sorting from Pie component invocation * refactor(piechart): hoist comparator for sorting display values * docs(piechart): include recommendations from @imatwawanaimatwawana * test(piechart): add test coverage for new sorting comparator * chore(piechart): regenerate Cue schema files * docs(piechart): apply suggestions from @imatwawana code review Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> * fix(piechart): fix typo, match punctuation in option description * chore(piechart): update schema to use existing `common.SortOrder` instead of custom Co-authored-by: Paul Marbach <paul.marbach@grafana.com> --------- Co-authored-by: Lukas Wieg <lukaswieg@googlemail.com> Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> Co-authored-by: Paul Marbach <paul.marbach@grafana.com>