Javascript Highcharts堆栈列问题

Javascript Highcharts堆栈列问题,javascript,highcharts,Javascript,Highcharts,以下是代码链接: 这两个示例中唯一不同的是系列部分。如果我将该值设置为null,那么它将不会显示在图表中 您可以设置yAxis:{min:0,max:100} y轴的最小值和最大值。这将影响y轴比例,如示例中所示 您只设置了最小y轴,请检查下面的Hi Gourav,我已通过将序列值设置为null解决了此问题。但还是要感谢你的帮助:) Highcharts.chart('container', { chart: { type: 'column' }, tit

以下是代码链接:


这两个示例中唯一不同的是系列部分。如果我将该值设置为null,那么它将不会显示在图表中

您可以设置yAxis:{min:0,max:100} y轴的最小值和最大值。这将影响y轴比例,如示例中所示
您只设置了最小y轴,请检查下面的

Hi Gourav,我已通过将序列值设置为null解决了此问题。但还是要感谢你的帮助:)
Highcharts.chart('container', {
    chart: {
        type: 'column'
    },
    title: {
        text: 'Stacked column chart'
    },
    xAxis: {
         categories: ["c1", "c2", "c3", "c4"],
    },
    yAxis: {
        min: 0,
        title: {
            text: 'Total fruit consumption'
        }
    },
    legend: {
        align: 'right',
        x: -30,
        verticalAlign: 'top',
        y: 25,
        floating: true,
        backgroundColor: (Highcharts.theme && Highcharts.theme.background2) || 'white',
        borderColor: '#CCC',
        borderWidth: 1,
        shadow: false
    },
    tooltip: {
        useHTML: true,
        formatter: function() {
            var tooltip = '';
            tooltip = '<b style="color:' + this.point.series.color + ';">Type: </b>' + this.point.series.name + '<br>';
            tooltip += '<b style="color:' + this.point.series.color + ';">Clicks: </b>' + Highcharts.numberFormat(this.point.y, 0, '.', ',') + '<br>';
            return tooltip;
        }
    },
    plotOptions: {
        column: {
            stacking: 'normal'           
        },
         series: {
            minPointLength: 10
        }
    },
    series: [
        {
            color: '#8fdc87',
            name: 'orange',
            data: [
                14943,0,3857,34
            ]
        },{
            color: '#7CB5EC',
            name: 'apple',
            data: [
                0,0,0,0
            ]
        },
    ],
});
series: [
    {
        color: '#8fdc87',
        name: 'orange',
        data: [
            14943,null,3857,34
        ]
    },{
        color: '#7CB5EC',
        name: 'apple',
        data: [
            null,null,null,null
        ]
    },
],