Reputation: 18600
Here highchart custom button code I want to close graph on click of custom button.
exporting: {
buttons: {
customButton: {
x: -62,
onclick: function () {
alert("I want to delete graph here");
},
symbol: 'circle'
}
}
}
Upvotes: 0
Views: 515
Reputation: 4993
In the documentation, there is the method destroy() with a jsfiddle example : http://api.highcharts.com/highcharts#Chart.destroy
exporting: {
buttons: {
customButton: {
x: -62,
onclick: function () {
chart.destroy();
},
symbol: 'circle'
}
}
}
Upvotes: 1