Reputation: 173
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:
Upvotes: 7
Views: 7305
Reputation: 471
this is work for me
PieData data = new PieData(dataSet);
// for set value of text label
data.setValueTextSize(8f);
// if you want change Label text
pieChart.setEntryLabelTextSize(8f);// pieChart is a object Of Piechart u can get by using findviewbyid
Upvotes: 0
Reputation: 281
Try this:
pieChart.setEntryLabelTextSize(8f);
This will change the size of your piechart slice label.
Upvotes: 2
Reputation: 3242
// reference to your data
PieData data = new PieData(labels, dataSet);
// this increases the values text size
data.setValueTextSize(40f); // <- here
Upvotes: 15