How to prevent my stacked series from being in reverse order?
highcharts, indexing, javascript, series, stacked
Solution
You can change order by index parameter which can be set in serie.
http://jsfiddle.net/KLttA/
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4],
index:1
}, {
data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2],
index:0
}]
Problem
I tried an example of stacked series on JSFiddle but according to me, series are reversed when stacked: ``` $(function () { $('#container').highcharts({ chart: { }, xAxis: { categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] }, plotOptions: { series: { stacking: 'normal' } }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }, { data: [144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4, 29.9, 71.5, 106.4, 129.2] }] }); }); ``` The first line in blue should be drawn first (January : 29.9), and the second should be added to this one (January : 29.9 + 144 = 173.9 ). Is there a way to get series in the right order when they are stacked?