不幸的是,使用现有选项无法做到这一点。我认为它需要对导航器mouseMoveHandler
方法进行一些修改。你可以在这里找到它:https ://github.com/highslide-software/highcharts.com/blob/5b1f3b0bc492252bbe0e283ec698480dbc179ba5/js/parts/Scroller.js#L651
这是您应该查看的功能部分:
// drag left handle
if (scroller.grabbedLeft) {
hasDragged = true;
scroller.render(0, 0, chartX - navigatorLeft, scroller.otherHandlePos);
// drag right handle
} else if (scroller.grabbedRight) {
hasDragged = true;
scroller.render(0, 0, scroller.otherHandlePos, chartX - navigatorLeft);
// drag scrollbar or open area in navigator
} else if (scroller.grabbedCenter) {
hasDragged = true;
if (chartX < dragOffset) { // outside left
chartX = dragOffset;
} else if (chartX > navigatorWidth + dragOffset - range) { // outside right
chartX = navigatorWidth + dragOffset - range;
}
scroller.render(0, 0, chartX - dragOffset, chartX - dragOffset + range);
}