When creating a chart with stacked columns using highcharts my series are added by default from top to bottom - the first added series is placed on top. I'd like to alter this behaviour so that the last added series was on top. I tried to change index and zIndex options, but then items in legend got reordered as well. Here is a simple example: http://jsfiddle.net/6bCBf/7/.
$(function () {
var chart = new Highcharts.Chart({
chart: {
type: 'column',
renderTo: 'container'
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar']
},
plotOptions: {
series: {
stacking: 'normal'
}
},
series: [
{
name: 'base',
data: [10, 20, 30],
index:25,
zIndex:10
},
{
name: 'sec',
data: [30, 20, 10],
index:1,
zIndex:9
}
]
});
});
Is it possible to change stack order, but keep legend ordering? I'd just like to have legend ordered alphabetically, but items in chart added from bottom to top.