Highcharts: chart detailing how to get a drill button click event

I am using Highcharts with a scan, and here is my working FIDDLE .

How can I get a drill button click event? I referenced the Highcharts API but cannot figure out how I can incorporate this into my code.

I want to do something like:

drillUp: function(){ //get point details by using something like this or this.point //get series details by using something like point.series } 
+7
javascript jquery graph charts highcharts
source share
2 answers

You need to catch event . See chart.events.drillup API doc. To get the series and the points in the series, you would do something like:

  events: { drillup: function (e) { console.log(this); console.log(this.options.series[0].name); console.log(this.options.series[0].data[0].name); } } 

Since you have not indicated which series or points you need, this is the most common method.

Link to updated working FIDDLE

+9
source share
 chart: { type: 'column', events: { drillup: function (e) { alert(e.seriesOptions.name); } } } 

In the line below

e.seriesOptions.name

You will get the name of the series that you are loading by clicking this button back (drill button).

+1
source share

All Articles