HighStock navigator from a stacked area chart shows wrong series

让人想犯罪 __ 提交于 2020-01-25 10:45:17

问题


I got a little problem in HighStocks: I have two area series wich are stacked. The problem: In the navigator at the bottom, just the first series is shown, not the resulted stacked chart.

(see http://jsfiddle.net/Je8eG/)

window.chart = new Highcharts.StockChart({
    chart: {
        renderTo: 'container'
    },

    plotOptions: {
        area: {
            stacking: 'normal'
        }
    },

    series: [{
        name: 'Series 1',
        data: [
            [Date.UTC(2010, 0, 1, 10), 53.5],
            [Date.UTC(2010, 0, 1, 10, 30), 59.5],
            [Date.UTC(2010, 0, 1, 11), 53.5],
            [Date.UTC(2010, 0, 1, 12), 28.5],
            [Date.UTC(2010, 0, 1, 13), 55.2]
        ],
        type: 'area'
    }, {
        name: 'Series 2',
        data: [
            [Date.UTC(2010, 0, 1, 10), 29.9],
            [Date.UTC(2010, 0, 1, 10, 30), 29.9],
            [Date.UTC(2010, 0, 1, 11), 29.9],
            [Date.UTC(2010, 0, 1, 12), 61.5],
            [Date.UTC(2010, 0, 1, 13), 53.4]
        ],
        type: 'area'
    }]
});

Is there a fix or workaround?

Thx for replies


回答1:


Something like this is not supported. You can set specific series to a navigator, so I advice to sum on your own stacked series, and then pass to navigator, see: http://api.highcharts.com/highstock#navigator.series



来源:https://stackoverflow.com/questions/15068435/highstock-navigator-from-a-stacked-area-chart-shows-wrong-series

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!