I am trying to add a String Label in order to label both the domain (x-axis) and the range (y-axis) of my LineChart
, as shown in the picture below.
关于如何使用 MPAndroidChart 执行此操作有什么建议吗?
(将@Ironman 的评论变成答案:)
从 MPAndroidChart 3.0.1 开始,使用库公开的 API 目前无法实现这一点。您将需要添加额外的TextView
在图表之外,或者根据您的目的修改库。
如果您想根据自己的目的修改库,则需要研究源代码XAxisRenderer https://github.com/PhilJay/MPAndroidChart/blob/70691bea41a43d9df21db1a785ea3cec3f79c8fc/MPChartLib/src/main/java/com/github/mikephil/charting/renderer/XAxisRenderer.java并将其子类化以添加绘制所需轴标签的功能。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)