mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Time series/Bar chart panel: Add ability to sort series via legend (#40226)
* Make legend sorting work in Time series panel * Import from schema Add properties to the cue schema as well * Order stacking * Add tests for orderIdsByCalcs * Add check for legend options * Fix cue schema * UI fixes * Order bars as well in barchart * Use different index when ordered * Legend sort series doc * Fix nits * Update docs/sources/panels/legend-options.md Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com> * Fix linting * Apply suggestions from code review Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com> * Update docs/sources/panels/legend-options.md Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com> Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
This commit is contained in:
@@ -258,6 +258,8 @@ export interface VizLegendOptions {
|
||||
displayMode: LegendDisplayMode;
|
||||
isVisible?: boolean;
|
||||
placement: LegendPlacement;
|
||||
sortBy?: string;
|
||||
sortDesc?: boolean;
|
||||
}
|
||||
|
||||
export enum BarGaugeDisplayMode {
|
||||
|
||||
@@ -5,9 +5,11 @@ LegendPlacement: "bottom" | "right" @cuetsy(kind="type")
|
||||
LegendDisplayMode: "list" | "table" | "hidden" @cuetsy(kind="enum")
|
||||
|
||||
VizLegendOptions: {
|
||||
displayMode: LegendDisplayMode
|
||||
placement: LegendPlacement
|
||||
displayMode: LegendDisplayMode
|
||||
placement: LegendPlacement
|
||||
asTable?: bool
|
||||
isVisible?: bool
|
||||
calcs: [...string]
|
||||
sortBy?: string
|
||||
sortDesc?: bool
|
||||
calcs: [...string]
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
Reference in New Issue
Block a user