Bharat Bharat - 16 days ago 9
Android Question

How to change text color of pie chart description in MPAndroidChart?

I am creating a pie chart using the MPAndroidChart library. In my app, I am having a black background and the text color of the pie chart description is grey be default which is not good for me. I am not able to change it.

How do I change the text color of the description?

My pie chart:

Answer

use setDescriptionColor(int color) method

chart.setDescriptionColor(getResources().getColor(R.color.your_color));