MPAndroidChart 中的 XAxis 标签角度 [英] XAxis label angle in MPAndroidChart
本文介绍了MPAndroidChart 中的 XAxis 标签角度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在为我的项目使用 MPAndroidChart 库.是否可以将 XAxis 的标签旋转 270 度,以便我可以容纳更多文本?
I am using MPAndroidChart library for my project. Is it possible to rotate the labels of the XAxis by 270 degrees so that I can fit more text?
推荐答案
原答案:
不幸的是,目前无法将图表 x 轴上的值旋转到一定程度/角度.您必须自己实现这样的功能.
更新:
从 v2.1.5 开始,此功能现已可用:
As of v2.1.5 this feature is now available:
XAxis xAxis = chart.getXAxis();
xAxis.setLabelRotationAngle(...);
这篇关于MPAndroidChart 中的 XAxis 标签角度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文