我正在尝试创建一个在HighCharts中具有堆叠列的时间序列图表

use*_*413 3 highcharts

这是我到目前为止所拥有的:

$(document).ready(function() {

    var options = {
        chart: {
            renderTo: 'container',
            zoomType: 'x',
            spacingRight: 20,
            defaultSeriesType: 'column'
        },
        title: {
            text: 'Job Postings by Distribution'
        },
        xAxis: {
            title: {
                text: 'Date'
            },
            type: 'datetime'
        },
        yAxis: {
            title: {
                text: 'Job Postings'
            }
        },
        credits: {
            enabled: false
        },
        series: [{
            name: 'Dice',
            data: [
                [1327899600000, 7], 
                [1327986000000, 11], 
                [1328072400000, 7]
            ]
        },
        {
            name: 'Career Builder',
            data: [
                [1327899600000, 7], 
                [1327986000000, 11], 
                [1328072400000, 7]
            ]
        }]
    }

    var chart = new Highcharts.Chart(options);
})
Run Code Online (Sandbox Code Playgroud)

我希望在给定时间内每列可以堆叠来自'Dice'和Career Builder的发行版的数据.但是我的图表没有显示任何内容.数据中的第一项是毫秒.第二项是分发给Dice或Career Builder的职位发布量,

eol*_*son 6

您的配置中缺少的是将堆叠设置为 'normal'

plotOptions: {
    series: {
        stacking: 'normal'
    }
}
Run Code Online (Sandbox Code Playgroud)

关于jsfiddle的完整示例

截图: 在此输入图像描述