Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Highcharts : Chart with drilldown how to obtain click event of drill up button

I am using Highcharts wtih drilldown and here is my working FIDDLE.

How can I get the click event of the drill up button ? I have referred the Highcharts API but can't figure out how can I 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
}
like image 780
Rahul Gupta Avatar asked Jun 30 '14 11:06

Rahul Gupta


1 Answers

You need to catch the event. See the chart.events.drillup API doc. To get the series and 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 did not state which series or points you wanted this is the most general method.

Link to the updated working FIDDLE

like image 102
wergeld Avatar answered Oct 12 '22 23:10

wergeld