Is it possible to sort the bars by ascending or descending order in a bar chart?
It is a very basic question, how can I sort the bars on a bar chart?
In my particular case, I want the bars to be sorted by ascending order, that is, I want the shortest bar to be on the left side of the chart and the tallest bar on the right side. I thought it would be a basic option, but I've searched the documentation I didn't find anything.
Thanks in advance!
@pauturvalles Simply sort the array of data before you hand it off to Echarts.
@pauturvalles Simply sort the array of data before you hand it off to Echarts.
Oh, I thought echarts would have some kind of sorting function, but I'll do as you say. Thanks!
Is there any way to sort the bars when they are stacked?
I know this issue is old but I try my luck here anyway: I am looking for a way to implement dynamic sorting of the dataset on behalf of the user. This could be some sort of toolbox button, which allows you to toggle between ascending and descending sorting order. A similar behaviour is e.g. supported by most table controls. Are there any plans to implement this in ECharts?
Is there any way to sort the bars when they are stacked?
Hey @irmie-rod-kobai were you able to resolve this? I also have the exact use-case.
I think this feature needs to be implemented somewhere around here