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

Tooltip sort #706

Open korinekgergely opened 5 months ago

korinekgergely commented 5 months ago

Tooltip Values Sort Order does not work? I tried to set it in the dashboard editor and in code, it doesn't work.

.setOption('tooltip', {
      mode: TooltipDisplayMode.Multi,
      sort: SortOrder.Ascending,
    })

Is it a bug or do I do something wrong? Screenshot 2024-04-23 at 15 25 58

leeoniya commented 5 months ago

looks like it is working correctly in your screenshot. what are you expecting here?

korinekgergely commented 5 months ago

Screenshot 2024-04-29 at 07 37 50 I think the Legend is the right, the Tooltip is false.

korinekgergely commented 5 months ago

But to return to the example above, I think CRITICAL should appear before WARNING. In fact, it should be first.

dprokop commented 5 months ago

But to return to the example above, I think CRITICAL should appear before WARNING. In fact, it should be first.

Why should that be? CRITICAL has the highest value, with ascending values sort it's placed correctly.

korinekgergely commented 5 months ago

I see. What confused me is that the legend sorts the names and the tooltip sorts the values. That's fine for us, thank you.