Description
hi, I want to know, how can I sort the tooltip and legend by their values for line series chart.
example code: https://bolt.new/~/sb1-cgcnmq
case 1:
when hover to the line, I want to make the tooltip sorted by their values from high to low.
for example, the following chart, the expected result should be "Month2 104" -> "Month1 76" -> "Month3 71"
case 2:
for legend, I want to show the legend sorted by their values from high to low ( or from low to high if possible).
The example in grafana, you can control rank from high to low, or from low to high:
another example from elastic chart story book:
The only doc about sort legend is here: https://elastic.github.io/elastic-charts/storybook/?path=/story/legend--sort-items&globals=toggles.showHeader:true;toggles.showChartTitle:false;toggles.showChartDescription:false;toggles.showChartBoundary:false;theme:light&knob-default%20sort=true&knob-enable%20legend%20size=true&knob-legend%20size=200&knob-position=right&knob-reverse=true
But I don't know how to make it work for line series chart. I tried some ways but it totally doesn't work.