Can we sync 2 highcharts drilldown so that if one drilldown is clicked, the other charts with the same id will drilldown accordingly?

↘锁芯ラ 提交于 2019-12-24 09:41:48

问题


Here are two different highcharts with drilldown datas. Can we sync the highcharts so that if the first drilldown 'type1' is clicked, other charts with 'type1' also drilldowns??

$('#drilldown-1').highcharts({
    series: [{
        data: [{
            name: 'type1',
            y: 5,
            drilldown: 'type-1'
    }],
    drilldown: {
        series: [{
            id: 'type-1',
            data: [
                ['type1.1', 4],
                ['type1.2', 2],
                ['type1.3', 1],
                ['type1.4', 2],
                ['type1.5', 1]
            ]
        }]
    }
}]
$('#drilldown-2').highcharts({
    series: [{
        data: [{
            name: 'type1',
            y: 5,
            drilldown: 'type-1'
    }],
    drilldown: {
        series: [{
            id: 'type-1',
            data: [
                ['type1.11', 8],
                ['type1.12', 4],
                ['type1.13', 16],
                ['type1.4', 2],
                ['type1.5', 1]
            ]
        }]
    }
}]

http://jsfiddle.net/nikbaidya0346/o4qmLLbq/5/

来源:https://stackoverflow.com/questions/38371262/can-we-sync-2-highcharts-drilldown-so-that-if-one-drilldown-is-clicked-the-othe

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