Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Own back button for drilldown charts

Tags:

highcharts

I have a pie chart with drilldown data.

Is it possible to hide the default back button and to trigger the back function from my own button?

like image 431
Torben Avatar asked Jan 10 '23 19:01

Torben


1 Answers

Yes, it's possible. Just create your own button and after click call chart.drillUp() function. See docs.

Highcharts v5 and v6: In Highcharts 5 classes were added to every element on a chart, so we can simply hide the button: http://jsfiddle.net/BlackLabel/zzLuQ/87/

.highcharts-drillup-button {
  display: none;
}

Highcharts v4:

To disable default button, set text to empty string, see: http://jsfiddle.net/zzLuQ/

Highcharts.setOptions({
    lang: {
        drillUpText: ''
    }
});
like image 149
Paweł Fus Avatar answered Jan 21 '23 19:01

Paweł Fus