jjzjj

LegendEntry

全部标签

android - MPAndroidChart PieChart 如何设置标签文字?

得到如下代码:Legendlegend=mChart.getLegend();legend.setLabels(newString[]{"aaaaa","bbbbb","ccccc"});这个设置没有生效还有其他方法可以设置文本吗? 最佳答案 我在v3.0.0中找不到方法setCustom(int[]color,String[]labels)。只有setCustom(LegendEntry[])您必须为其传递LegendEntry对象。Listentries=newArrayList();for(inti=0;i