title: Creating highstock zoom-in/out button
body: <p>I have the following problem - I'm trying to create highstock graphic with zoom-in/zoom-out buttons, but something is wrong with the zooming. When i press the button most of the times the chart zooms to the correct time interval, however, after I press the button a couple more times, the chart starts to behave weird - the animations aren't correct or it doesn't zoom or it zooms to the wrong interval.</p>
  
  <p>This is the zooming function:</p>
  
  <pre><code>var xAxis = graphic.xAxis[0];
  var minimum = xAxis.dataMin;
  var maximum = xAxis.dataMax;
  
  var newMin = 0;
  var newMax = 0;
  
  //when zooming out
  
  newMin = xAxis.min - 360000;
  newMax = xAxis.max + 360000;
  
  //when zooming in
  
  //newMin = xAxis.min - 360000;
  //newMax = xAxis.max + 360000;
  
  if (newMin &lt; minimum)
      newMin = minimum;
  
  if (newMax &gt; maximum)
      newMax = maximum;
  
  if (newMin &gt; newMax) {
      alert("min bigger than max");
  }
  
  console.log("newMin: " + newMin + "    newMax: " + newMax);
  
  xAxis.setExtremes(newMin, newMax);                       
  </code></pre>
  
  <p>Here's a fiddle: <a href="http://jsfiddle.net/E5kth/3/" rel="nofollow">http://jsfiddle.net/E5kth/3/</a></p>
  
  <ul>
  <li>jquery - 1.6.4</li>
  <li>jquery mousewheel - 3.1.6</li>
  <li>highstock - 1.3.7</li>
  </ul>
  
  <p>Thanks in advance ;]</p>
  
  <p><strong>EDIT:</strong>
  Here is a NEW video with better explanations of the problem: <a href="https://www.dropbox.com/s/5x1k5b0lbtqw81u/highstock_ordinal-false_bug_converted.avi" rel="nofollow">https://www.dropbox.com/s/5x1k5b0lbtqw81u/highstock_ordinal-false_bug_converted.avi</a>
  for better quality - download the video, dropbox streaming is with low quality.</p>