I'm creating charts with the HighCharts library and I wonder how to remove the 2 little buttons on the right corner which one you can print and download graphs and I'd like to add a new one.
Maybe someone could help me?
You can disable the buttons if you like, according to the documentation. The documentation even provides an example of the chart being loaded, with the buttons disabled.
In your configuration, be sure to include the following:
var chart = new Highcharts.Chart({
/* Other items removed to focus on navigation */
navigation: {
buttonOptions: {
enabled: false
}
}
});
If you want to remove all buttons the best place to do it is here:
exporting: {
enabled: false
}
If you disable on the navigation only buttons are disabled, the exporting module continue to be loaded.
To disable only one button you have to use the following:
exporting: {
buttons: {
exportButton: {
enabled: false
}
}
}
The code below disable the export button.
I don't know how to add a button without adding a new svg element, but if you won't to use export buttons, why don't you change your chart button style and function ? You can do it following the reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With