在下面的小提琴中,我如何同步所有三个图表的x轴缩放?谢谢。
小提琴:https://jsfiddle.net/mbfhqsLx/62/
function syncZoom(target, e) {
var chart = $(target).highcharts(),
min, max;
min = e.min === null ? e.dataMin : e.min;
max = e.min === null ? e.dataMax : e.max;
syncing = true;
chart.xAxis[0].setExtremes(min, max);
syncing = false;
}
1条答案
按热度按时间gmol16391#
You can use
afterSetExtremes()
to implement synchronized zoom:Demo:https://jsfiddle.net/BlackLabel/w5890cen/
API Reference:https://api.highcharts.com/highcharts/xAxis.events.afterSetExtremes