如何在highstock中以编程方式设置导航器句柄?

时间:2015-06-02 06:27:53

标签: css angularjs highcharts highstock

我是否可以通过编程方式在highstock导航器中设置标记,即使我希望将标记设置为{ type: "day", count: 1, text: "1d" }但不显示Zoom 1d

1 个答案:

答案 0 :(得分:1)

可以使用rangeSelector方法xAxis.setExtremes()设置极端情况http://plnkr.co/edit/bRnV1lyJHmmx7YURTggq?p=preview

  chart: {
    renderTo: 'container',
    height: 600,
    events: {
      load: function() {
        var max = this.xAxis[0].max,
            range = 24 * 3600 * 1000; // one day

        this.xAxis[0].setExtremes(max - range, max);
      }  
    }
  },