How do I detect a zoom event in highcharts?

后端 未结 3 1332
清歌不尽
清歌不尽 2021-02-05 10:57

Is it possible to detect a zoom event in Highcharts? My use case is that I have some state external to the chart, and when the user zooms in on part of it I want to detect what

3条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 11:21

    You want to look at the redraw event as well. When you zoom, the chart is redrawn to reflect the changes. chart.events.redraw

    events: {
        redraw: function(){
            console.log(this.xAxis);
            console.log(this.yAxis);
        }
    }
    

提交回复
热议问题