Mpandroidchart多胎Barchart。 X轴的字符串?
我正在使用 mpandroidchart 。我想用一些数据集绘制条形图,但是在我的X轴上,我的字符串数据类型不是浮动。 例如,此图表X中有冰淇淋口味,y和2个数据集的销售(数字):
/MpandroidChart/v3.1.0/javadoc/“ rel =“ nofollow noreferrer”> bardataset 是 barentry ,这是x和y float值的元组。
是否可以将Barentry中的字符串 +数字关联?
I'm using MPAndroidChart. I want to draw a bar chart with some datasets, but in my x axis I have string datatype not float.
For example, this chart with ice cream flavors in X, sales (number) in Y and 2 datasets:
BarDataSet is a collection of BarEntry, which is a tuple of x and y float values.
Is it possible to associate strings + numbers in BarEntry?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
MPCHART仅支持X和Y中的漂浮物,因此您将自己制作映射。例如,1.0f表示巧克力,2.0f表示香草,3.0f表示草莓,并在valueformatter中转换显示格式:
MpChart only supports float in both X and Y, so you have make the mapping yourself. For example 1.0f means chocolate, 2.0f means vanilla, 3.0f means strawberry, and convert the display format in ValueFormatter like this: