How can I sort the legends values (40, 80, 10, 5) in descending order?
The first value should be displayed in Green color and then other 3 will be any colors.
I tried with this code to display my first legend item in green color. Any Ideas for sorting the legend item?
{name: '{/literal}{$value.0.opt1}:{$a}{literal}',y: {/literal}{$a}{literal}, color: '#6B8E23'}, //green
{name: '{/literal}{$value.0.opt2}:{$b}{literal}',y: {/literal}{$sort.0}{literal}, color: '#A9A9A9'},
{name: '{/literal}{$value.0.opt3}:{$c}{literal}',y: {/literal}{$sort.1}{literal}, color: '#696969'},
{name: '{/literal}{$value.0.opt4}:{$d}{literal}',y: {/literal}{$sort.2}{literal}, color: '#FFFFFF'}]
P.S. I am not familiar with jQuery.
i find a solution. you should sort the legend values before pass the values in data. then set the colors in array.