0

我正在查看 LightningChartJs 的 chartXY 的方法,但似乎找不到暂停滚动的方法。我想知道一种播放(继续)滚动的方法。提前致谢

4

1 回答 1

2

您可以通过调用Axis.stop() 方法来暂停滚动。

然后,您可以通过调用Axis.release() 方法继续滚动。这会将视图滚动到添加的最新添加值,同时暂停滚动。

// Cache the default X axis for this example
const axisX = chart.getDefaultAxisX()

// Stop the axis from scrolling after 5 seconds
setTimeout(() => axisX.stop(), 5000)
// Release the axis after 6 seconds
setTimeout(() => axisX.release(), 6000 )
于 2020-07-22T10:24:47.707 回答