我想要实现的是当导航器向右移动时系列占据图表的70%(例如我们看到最新的系列)。
我目前正在使用:
afterSetExtremes: function (e) {
var extrX = series.xAxis.getExtremes();
if (e.trigger=="rangeSelectorButton" || e.trigger=="navigator")
{
viewSpanMax = (extrX.max);
viewSpanMin = (extrX.min);
viewSpanDelta = viewSpanMax-viewSpanMin;
}
else if (series.points[series.points.length-1].x==e.max)
{
viewSpanMin += series.points[series.points.length-1].x-viewSpanMax;
viewSpanMax = series.points[series.points.length-1].x;
viewSpanDelta = (viewSpanMax-viewSpanMin)*1.3;
}
series.xAxis.setExtremes(Math.max(viewSpanMin,extrX.min),viewSpanMin+viewSpanDelta, false, false);
}
实施非常错误,我想知道是否有高效图表的工作示例,其中系列仅部分显示(未来时间仍然可见)。