Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Manually Triggering drillup event, highcharts

I am working on drilldown/up chart of highchart.. i was able to trigger drill down event on a point click from outside highchart through:

chart.series[0].data[0].firePointEvent('click', event);

but i can't find any event which would trigger on the back button of the chart. See this fiddle I want to programatically trigger click event on "Back to Overview" event. Thank You in advance.

like image 933
user3601092 Avatar asked Dec 01 '22 18:12

user3601092


1 Answers

I think you can just call drillUp() function on your chart like this:

$('#drillUp').click(function() {
    if (chart.drilldownLevels.length > 0) {
        chart.drillUp();
    }
});

You need to check that chart.drilldownLevels array contains elements before calling this function. See updated demo.

like image 83
Ilya Luzyanin Avatar answered Dec 03 '22 06:12

Ilya Luzyanin