我试图通过单击绘图区域并拖动光标来在简单的高库存图表上实现平滑平移。
我注意到,如果我的数据没有加时间戳,它将非常有效:
data: [-25.1,-23.8,-19.9,-19.1,-19.1,-20.7,-20.7,-21.6,-21.6,-22.2,-22.2,-22.6,-22.6,-22.9,-22.9,-23.2,-23.2,-23.7,-23.8,-23.8,-24,-24,-24.1,-24.2,-24.2,-24.4,-24.5,-25.7,-25.8,-25.8,-25.8,-25.2,-25.2,-25.3,-25.3,-25.4,-25.5,-25.5,-25.5,-25.5,-25.6,-25.6,-25.2,-24.6,-24.6,-24.2,-24.2,-24.8,-25.1,-25.1,-25.3,-25.3,-25.4]
请参见https://jsfiddle.net/jhartnag/vrq396ja/
但是,一旦添加时间戳记,平移就会停止连续进行,并以增量进行平移:https://jsfiddle.net/jhartnag/e8w72o4z/
(最重要的是,导航器窗口似乎发生了变化,但这是我想的另一个问题)
如何在Highstock中使用带时间戳的数据实现平滑平移?
答案 0 :(得分:0)
我通过在轴上设置ordinal : false
来固定它:
xAxis : {
...
ordinal : false
}