I use HighCharts to render a horizontal bar chart in the form of a stack, and it works fine, except that by default HighCharts changes the order of my serial data.
http://jsfiddle.net/U8nZ6/
As you can see in the demo, despite the fact that $ 20k is the first line of the data1 / data2 array, this is the last piece of each bar (all the way to the right). I would like it to be alright, so I tried a couple of things:
1) Display a chart with an array of .reverse() d. You can include these lines in the above demonstration to see that the result of this is that the colors do not line up, as each chart has a different number of entries, so this will not work (and there should not be the only way to do this , I'm sure)
2) Use xAxis.reversed = true . This puts it in the correct order with the corresponding colors, but then the legend changes to the opposite (from 100% to 0%), and it animates from right to left.
Is there another way?
source share