Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

highcharts hide zoom reset button, call zoom reset programmatically

I have a nice chart in highcharts that the user can zoom into. I really don't like the built-in ZOOM RESET button, and would like to add my own custom zoom reset button into a nav bar already present.

So my questions are: 1. Is there a way to hide the default highcharts ZOOM RESET button? 2. Is there a method/function I can call to perform the ZOOM RESET? (I can call that from my own button click)

like image 648
TSG Avatar asked Feb 22 '13 20:02

TSG


1 Answers

You can pass resetZoomButton as display: none and call zoomOut.

chart: {     resetZoomButton: {         theme: {             display: 'none'         }     } }  $('#resetZoom').click(function() {     chart.zoomOut(); });  <input type="button" value="reset zoom" id="resetZoom"/> 

Demo

like image 194
Ricardo Alvaro Lohmann Avatar answered Oct 13 '22 22:10

Ricardo Alvaro Lohmann