score:13
just had a look around the highcharts source code, it looks like this may work out for you:
chart.showresetzoom();
also, in order for the button to work correctly, you should use axis.zoom instead of setting the extremes:
axis.zoom(newmin,newmax);
let me know if it works!
score:0
if you are using setextremes you can also set min and max to null to reset:
chart.xaxis[0].setextremes(null, null)
score:1
this approach works well:
if (!$('.highcharts-button').length) {
chart.showresetzoom();
}
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.
score:7
you can use showresetzoom
, but you have to check if the reset button is already visible, otherwise it won't desapear.
if( !chart.resetzoombutton ) {
chart.showresetzoom();
}
Source: stackoverflow.com
Related Query
- Highcharts 'Reset Zoom' after calling setExtremes
- highcharts hide zoom reset button, call zoom reset programmatically
- Highcharts chart click event fired on click of the reset zoom button (bug?)
- Execute function after zoom highcharts
- highcharts how to catch and insert logic in click reset zoom button event
- Calling Reset Zoom manually
- Highcharts zoom issue after upgrading to jQuery 1.8
- Rescale Y-axis in Highcharts after zoom while maintaining zoomType=x behavior
- HighCharts - Set Max and Min values in zoom reset
- Highcharts zoom on 2 charts - Reset zoom issue
- Get max value and label in series after zoom in JS HighCharts
- javascript, change default position after zoom on highcharts maps
- highcharts tooltip not working after zoom
- highcharts - zoom issue after changing series data
- Highcharts - Reset zoom in synchronised charts
- Highcharts spiderweb chart resizes axis after calling series.setData
- highcharts reset zoom button
- Highcharts - show markers on zoom event (selection) and hide on reset zoom. Is it possible?
- Styling HighCharts reset Zoom button with Material UI button
- HIghcharts Scrollbar (w/ showFull false) displays after setExtremes called
- highcharts how to override reset zoom button event
- Highcharts - Missing Data after setExtremes
- high charts xAxis label cannot be display after reset zoom
- Highcharts reset zoom doesn't center data points
- Highcharts custom indicator does not affect y axis range after zoom
- In Highcharts after zoom in and zoom out some of the x-axis values are not display
- Highcharts y-axis labels removed after zoom out
- Calling Highcharts export to jpeg but the source is https and exporting is http (security warnings issued by browser)
- Highcharts - Hide the Reset zoom button always
- Python: Read data from Highcharts after setExtreme
More Query from same tag
- Highchart: Internal Server error NOW
- Highcharts: How can I make the range attribute work?
- Email Charts - Bar, Area and Pie Charts
- Additional data to highcharter tooltip
- Highcharts-ng directive (Angular) not updating
- Cannot set Individual Point color in Series for Highstock API, it works for Highchart API
- drilldown maps and funnell charts on the same page using highcharts
- HighCharts : dataLabels errorBar
- Customise Highstock tooltip conditionally
- How to set a Maximum yAxis range for HighChart graph?
- How to add units to Highcharts/Highmaps's last legend/coloraxis?
- Highcharts: How to hide the text from legends
- change vertical lines position in column chart
- How to use a custom JSON map in Highmaps
- css clip-path source url gets change while using in solution
- When trying to display a chart using ChartIt, Error saying template does not exist arises
- Remove flag legend in Highcharter graph
- Pie Charts with advanced design
- remove print button
- How to set the dynamic value from a text box to the graph using Highcharts?
- Highcharts dual X axis chart not scaling axis
- How to synchronize the From To date wrapper in Highstock?
- highmaps stopped updating after move to .NET Core
- Highcharts: show stack total in shared tooltip, via footerFormat property
- Three level drill down highmap
- How to assign chart title as exporting filename?
- How to set GeoJSON object property as class name other than name in HighMaps
- highcharts: stop chart from trapping mouse events, or capture mouse click on the ENTIRE chart
- Fixed padding in callout box of timeline chart
- Always display data labels above columns in HighCharts