Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I change the pie chart value text size?

I'm trying to create a Pie chart using MPAndroidChart. How do I set the text size for the values displayed on the chart pertaining to the various percentages of components specified?

In short, I want to make these labels appear bigger:

a pie chart with percentage labels in the slices

like image 237
Vidhyasagar Avatar asked Apr 23 '16 19:04

Vidhyasagar


2 Answers

// reference to your data
PieData data = new PieData(labels, dataSet);

// this increases the values text size  
data.setValueTextSize(40f); // <- here
like image 134
marco Avatar answered Nov 15 '22 07:11

marco


Try this:

pieChart.setEntryLabelTextSize(8f);

This will change the size of your piechart slice label.

like image 34
Akshay Chavan Avatar answered Nov 15 '22 08:11

Akshay Chavan