Drilldown for grouped column chart in highcharts

戏子无情 提交于 2019-12-01 12:19:14

This is a great question!

In your series data, what you'll need to is define a y value and an associated drilldown id for each data point, such as: { y: 40351.62, drilldown: 'test' }.

Then, you can set up items in the drilldown attribute for the expanded data.

The beauty of this method is that you can specify drilldowns for only the columns you want (say, for only one series).

Here's the code I modified for this example:

drilldown : {
    series: [{
        name: 'Test Drilldown',
        id: 'test',
        data: [
            [ 'data A', 24.13 ],
            [ 'data B', 17.2 ],
            [ 'data C', 8.11 ],
            [ 'data D', 5.33 ]
        ]
    }]
},
series: [
      {
        "name": "First",
        "data": [
          { y: 40351.62, drilldown: 'test' },
          51506.83,
          68566.23,
          80596.9228,
          94329.31
        ]
      },
      // ... other series
]

You can find an updated version of your fiddle here: http://jsfiddle.net/brightmatrix/6LXVQ/1187/

I hope this is helpful for you!

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