Drilldown multiple levels Highchart

前端 未结 6 2099
清歌不尽
清歌不尽 2020-12-05 05:19

We like to Drilldown on multiple levels in Highchart. Is there already an example in Highchart?

Currently used code:

$(div).highchar         


        
6条回答
  •  半阙折子戏
    2020-12-05 05:38

    It's possible, just add all drilldown series, then create connection between point and drilldown. See: http://jsfiddle.net/6LXVQ/2/

        series: [{
            name: 'Things',
            colorByPoint: true,
            data: [{
                name: 'Animals',
                y: 5,
                drilldown: 'animals'
            }]
        }],
        drilldown: {
            series: [{
                id: 'animals',
                name: 'Animals',
                data: [{
                    name: 'Cats',
                    y: 4,
                    drilldown: 'cats'
                }, ['Dogs', 2],
                    ['Cows', 1],
                    ['Sheep', 2],
                    ['Pigs', 1]
                ]
            }, {
    
                id: 'cats',
                data: [1, 2, 3]
            }]
        }
    

提交回复
热议问题