pir8radio
Posts: 16
Joined: Fri Jan 14, 2022 8:33 pm

NEED HELP Sort Legend by value

hi i need to sort this first pie chart by version, highest version first.. the data is supplied by array so i cant set an index... i just need to sort with 3.3.0 first then 3.2.2 next and so on.. this value is dynamic and new versions will be added often.. i just need the legend to show in 321.... order highest first.

https://explorer.notallmine.net/peers-charts/

help appreciated.. IM STUCK lol :lol:
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: NEED HELP Sort Legend by value

Hi pir8radio,

Thanks for contacting us with your question.

Pie in the link that you shared seems to have legend sorted correctly (3.3.0, 3.2.2, 3.2.1). Legend item order depends on series order, so you either need to make sure that your series have correct order or use legendIndex to set the order manually.

Let me know if either of these options would work for you.
Regards!
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”