title: Highstock setExtremes with a custom range selector button
body: <p>In highstock range selector I added a custom range selector button (named: my dates) and would like to set a custom extremes when this button is called. I know it works if you put simple button outside the chart and call: chart.xAxis[0].setExtremes(30,80);.</p>
  
  <p>But my scenario is different I want to add a button beside "1m 1y All" range selector buttons, and want that new button to set a custom extremes dates. Using xAxis events setExtremes, does not seems to work unless I am missing something. <a href="http://jsfiddle.net/Aeaz3/1/" rel="nofollow">http://jsfiddle.net/Aeaz3/1/</a></p>
  
  <pre><code>$(function() {
  
    $.getJSON('http://www.highcharts.com/samples/data/jsonp.php?filename=aapl-c.json&amp;callback=?', function(data) {
      // Create the chart
      $('#container').highcharts('StockChart', {
  
  
          rangeSelector: {
                      buttons: [{
                          type: '',
                          count: 2,
                          text: 'My dates'
                      },{
                          type: 'hour',
                          count: 1,
                          text: '1h'
                      }, {
                          type: 'day',
                          count: 1,
                          text: '1d'
                      }, {
                          type: 'month',
                          count: 1,
                          text: '1m'
                      }, {
                          type: 'year',
                          count: 1,
                          text: '1y'
                      }, {
                          type: 'all',
                          text: 'All'
                      }],
          },
  
          title : {
              text : 'AAPL Stock Price'
          },
          xAxis: {    
                          events:{
                              setExtremes: function(e) {
                                    var xMin = e.min;
                                   var xMax = e.max; 
                                  var zmRange = computeTickInterval(xMin, xMax);
                                      this.chart.xAxis[0].options.tickInterval =zmRange;
                                      this.chart.xAxis[0].isDirty = true;
  
  
                              },
                          }
          },
          series : [{
              name : 'AAPL',
              data : data,
              tooltip: {
                  valueDecimals: 2
              }
          }]
      });
    });
  
  });
  </code></pre>