android-graphview - 滚动时图形数据与轴标签重叠
问题描述
启用滚动和/或缩放时,图表上的数据与图表的 y 轴重叠。y 轴标签可以被覆盖,数据也可以溢出右侧。有没有办法解决这个问题?
代码:
// min and max are the first and last X-values of the data
graph.getViewport().setXAxisBoundsManual(true);
graph.getViewport().setMinX(min);
graph.getViewport().setMaxX(max);
graph.getViewport().setScalable(true);
graph.getGridLabelRenderer().setNumHorizontalLabels(3);
graph.getGridLabelRenderer().setHumanRounding(false);
编辑:在 Y 轴上启用缩放时也会发生这种现象,只是它与 X 轴重叠。
解决方案
推荐阅读
- javascript - 使用多个单选按钮验证多个选项卡
- android - Android - 具有相似 URL 的深度链接
- excel - 从 Outlook VBA 激活工作表
- java - Spring Boot 从 Java 启动 Zookeeper 和 Kafka Server
- elasticsearch - Elapsed Plugin 创建一个带有日志详细信息的新事件
- python-3.x - PermissionError:[Errno 13] 权限被拒绝:'./img/'
- android - java.lang.NullPointerException:尝试在空对象引用上调用虚拟方法“boolean android.view.WindowInsets.isConsumed()”
- python - *.whl 不是此平台上支持的轮子
- android - Android 附加功能在 onBackPressed() 上丢失
- javascript - 如何循环遍历 `this.state` 对象中的数组?