首页 > 解决方案 > 获得可见的刻度/轴范围

问题描述

我正在使用 Arction LightningChartJs 我想知道如何在渐进式滚动轴中获取可见 x 轴的当前比例/范围。谢谢

标签: javascriptlightningchart

解决方案


chart.getDefaultAxisX().scale.getInnerStart();//Returns the start of the x axis
chart.getDefaultAxisX().scale.getInnerEnd();//Returns the end of the x axis

图表类具有 scale 属性,该属性又具有在触发这些方法时检索起点和终点的方法。


推荐阅读