我正在使用MPAndroid图表 https://github.com/PhilJay/MPAndroidChart图书馆。
在 BarChart 中,默认情况下所有条形都是垂直的(自下而上),如何将其水平显示?
有两种类型条形图的方向。
除此之外,还有所谓的堆叠条(单个条中的多个值),可用于水平和垂直BarChart
。堆叠条的条目可以通过构造函数创建BarEntry
class.
// normal entry
BarEntry normalEntry = new BarEntry(float value, int xIndex);
// stacked entry
BarEntry stackedEntry = new BarEntry(float [] values, int xIndex);
另外,请查看设置数据的文档 https://weeklycoding.com/mpandroidchart-documentation/setting-data/.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)