grafana/scenes

Time Series Legend default sort order

Closed this issue · 1 comments

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.

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