Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我动态绘制值时,我希望在折线图上显示最近绘制的值(在 AChartEngine 库的帮助下绘制)。换句话说,我希望沿 x 轴向左滚动我的折线图以显示最新的绘制值并隐藏最旧的绘制值。如何做到这一点?
每当您向数据集添加值时,如果您调用 chartView.repaint(); 图表使用新值更新。
为了让值向左滚动,您需要更改 X 轴上的可见区域:
renderer.setXAxisMin(theMinimumVisibleValue); // this may be optional // renderer.setXAxisMax(theMaximumVisibleValue);