score:6

Accepted answer

You can set index and zIndex to keep order between layers, then add serie with appropriate parameters.

Example: http://jsfiddle.net/6bCBf/5/

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:2,
            zIndex:10
        },
        {
            name: 'sec',
            data: [30, 20, 10],
            index:1,
            zIndex:9
        }
    ]
},function(chart){



    $('#add').on('click', function (e) {

        chart.addSeries({
            data: [32, 43, 42],
            index: 0,
            zIndex:1
        });
    });


});

score:0

Highcharts also supports a yAxis.reversedStacks property which, if set to false, will reverse the order of the stacking data points. In the OP's JSFiddle, the first series, "base", appeared on the top of the chart, while the second series, "sec", appeared below it. Setting reversedStacks: false as in this updated JSFiddle reverses that order, and the new series appears on the top of the stack instead of the bottom.


Related Query

More Query from same tag