Sorting the legend values in pie chart

Hi There,
I’m using a pie chart & displaying the legend for ‘numeric’ categories. I did not find a way to sort the legend values. Any idea if we can sort the legend values?

Appreciate the help.


Can you sort by the value?


If not the value, you can look for more sort options and sort on whatever field you want.

Let me know if this helps

Hi Max,
Here is the use case, if let’s say I have RT1, RT2…RT10,RT11 & I use the sort option as you show above the legend is sorted something like RT1,RT10,RT11, RT2… etc basically all the RT’s that starts with 1 like RT1,RT10,RT11…are sorted out first & goes RT2,RT3…


Well depending on the actual values, you might be able to make a calculated field that can sort on that value.

For your case you would need to get an integer and then sort on the average (more counts will skew the sum). You could look to do this.

integer_field = parseInt(split({field},‘RT’,2))