Highcharts JS:Sankey系列相互叠加而不是相互叠加

时间:2018-01-23 21:51:05

标签: highcharts

我试图在一个图表区域内显示五个不同的系列(全部为Sankey类型)。我想让图表一个接一个地出现,但是,当我使用下面的代码时,图表会叠加在一起。

Highcharts.chart('chart', {

    title: {
        text: 'Highcharts Sankey Diagram'
    },

    series: [
        {
            curveFactor: 0,
            data: [
                {
                    from: 'Category 1',
                    to: 'Category 2',
                    weight: 5
                }, {
                    from: 'Category 2',
                    to: 'Category 3',
                    weight: 5
                }
            ],
            type: 'sankey'
        },
        {
            data: [
                {
                    from: 'Category 4',
                    to: 'Category 5',
                    weight: 5,
                    total: 400
                }, {
                    from: 'Category 5',
                    to: 'Category 6',
                    weight: 5
                }, {
                    from: 'Category 6',
                    to: 'Category 7',
                    weight: 5
                }, {
                    from: 'Category 7',
                    to: 'Category 8',
                    weight: 5
                }
            ],
            type: 'sankey'
        }
    ],

    chart: {
        backgroundColor: '#26303A'
    }

});

我已经尝试在stacking: null中设置plotOptions.series,但这似乎无效,因为无论如何都是默认值。

0 个答案:

没有答案