grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
133 stars 20 forks source link

Time Series Legend default sort order #689

Closed korinekgergely closed 5 months ago

korinekgergely commented 5 months ago

In grafana scenes, is it possible to predefine the order of Legends in the Time Series panel (table view)? Similarly, as in the case of the Tooltip, the 'Values sort order'? I want the same effect as if I had clicked on the 'name' field.

Monosnap Edit panel - Template Dashboard !!!! DO NOT DELETE !!!! - Dashboards - Grafana 2024-04-11 15-19-29 Monosnap Edit panel - Template Dashboard !!!! DO NOT DELETE !!!! - Dashboards - Grafana 2024-04-11 15-09-26 Thank you.

korinekgergely commented 5 months ago

Found a solution: .setOption('legend', { calcs: ['min','max'], displayMode: LegendDisplayMode.Table, placement: 'bottom', sortBy: 'Name', sortDesc: false, })