I have a MPAndroidChart BarChart and I have looked through the javadoc and online documentation but am unable to find a way to increase the size of the text at the bottom of the chart.
Here is an image which shows the chart and the font at the bottom left which is too small to view properly on this higher resolution tablet. Is there a way to increase this font size?
Note: I recognize that increasing the axis label size is done with:
chart.getXAxis().setTextSize(20);
Edit: I have searched online at a variety of topics and looked through the MPAndroidChart github project but have been unable to find code to make this change. I have been able to change all the other font sizes so can only assume this must also be possible.
Okay so I found the answer in the MPandroidchart documentation:
First load the legend:
Legend l = pieChart.getLegend();
Then you can modify the legends properties such as the text size,color, or the shape of the objects in your legend:
l.setTextSize(20f);
l.setTextColor(Color.BLACK);
l.setForm(Legend.LegendForm.CIRCLE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With