How can I create PieChart like the one shown below in Android using MPandroidchart? Small value will change style of legend
Related
I am using Android Plot(http://androidplot.com/) library to draw a Pie chart and Pie chart draw is fine but I want legend and its customisation as shown in attached image so please guide me to do same in Android Plot library.
Pie chart legends were added in Androidplot 1.5.0 but is disabled by default. To enable:
pieChart.legend.setVisible(true);
Configuration of the legend works the same way it does for other series types in Androidplot. For example, you can configure a single column with 4 rows:
pie.getLegend().setTableModel(new DynamicTableModel(1, 4));
Or a single row with 4 columns (shown below):
pie.getLegend().setTableModel(new DynamicTableModel(4, 1));
I need to create a doughnut shaped Pie Chart, exactly as below example:
Maybe some people will ask why I said a Pie Chart instead of Doughnut Chart. I tried using Doughnut Chart, but the legend doesn't give me the information I need. It gave me category titles instead of color definition of each area in the chart, just like below image:
See the legend above? That is not what I want. Instead, I need the legend to be like the one in Pie Chart:
But Pie Chart has no hole in the center. How to make a doughnut shaped Pie Chart?
I have created a Pie on achartengine but the labels displayed are overlapping. There is a way to set the label ratio on a Pie with achart engine Android?
Set the labels (category name) with the values and hide the legend. Finally, implement the legend manually out of the chart.
I am using achart engine for displaying some graphics in my application (http://www.achartengine.org/)
However for the pie chart when I set display chart values to true, I get the values but they are painted in a tone of gray that's almost invisible in the actual graphic colors.
Is there a way to change this color?
Preferably make one black and the other one white.
If I recall correctly, you can change the color of the labels using setLabelsColor function like:
renderer.setLabelsColor(Color.BLACK);
I am displaying pie charts in my application.
I want to increase and decrease size of the legends in the pie chart.
How do I achieve this?
The color of the legend items is the same as the slice colors. You cannot change that.