平移图表

时间:2015-07-27 08:15:54

标签: javascript highcharts

我有一张带时间轴的高图。可以通过以下方式更改极值点:

  • 移动时间轴栏
  • 或在图表内平移

我只想在鼠标启动时调用“doSomeStuffs”。

如果用户移动时间轴栏,则在鼠标向上时,会出现mouseUp事件。这是预期的行为。

xAxis: {
    events: {
        setExtremes: function (e) {
            console.log("called many times");

            if (e.DOMEvent && e.DOMEvent.type == 'mouseup') {
                console.log("only called when the mouse is up");
                doSomeStuffs();
            }
        }
    }
}

但是,它在图表内部平移的情况下不起作用。鼠标启动时没有mouseUp事件。有没有人有任何想法?

0 个答案:

没有答案