2017-07-10 19 views
1

enter image description here如何在Android图中添加饼图的图例?

我使用Android的情节(http://androidplot.com/)库画一个饼图和饼图平局是不错,但我想传说及其作为附加的图像显示自定义所以请指导我做同样的在安卓绘图库。

+0

MPA图表库最好的饼图例如,你可以用4行配置单柱 –

+0

@DarshanKachhadiya:我想在IOS图形库“核心图”中生成相同的图形,并且所有其他图形都可以在Android图形中正常工作。 – Hits

回答

1

饼图图例在Androidplot 1.5.0中添加,但默认情况下禁用。要启用:

pieChart.legend.setVisible(true); 

Configuration of the legend工作确实在Androidplot等系列类型相同的方式。

pie.getLegend().setTableModel(new DynamicTableModel(1, 4)); 

或单排,4列(如下图所示):

pie.getLegend().setTableModel(new DynamicTableModel(4, 1)); 

enter image description here