Accepted answer

just had a look around the highcharts source code, it looks like this may work out for you:


also, in order for the button to work correctly, you should use axis.zoom instead of setting the extremes:


let me know if it works!


if you are using setextremes you can also set min and max to null to reset:

chart.xaxis[0].setextremes(null, null)


this approach works well:

if (!$('.highcharts-button').length) {

this is assuming that the only button that might show is the "reset zoom" button. if it is already there, don't show another.

if you don't do this check, a new button is added each time you call showresetzoom(). clicking the visible (most recent) button resets the zoom and removes the button but the older buttons are still visible and do nothing.


you can use showresetzoom, but you have to check if the reset button is already visible, otherwise it won't desapear.

if( !chart.resetzoombutton ) {

Related Query

More Query from same tag