I am using MPAndroidChart Library for showing a Bar Chart. Empty view for Data Bar Chart is showing "No chart data available":
Also I need to change this message. But it's not working for changing this I have used this code lines:
mChart.setNoDataText("No chart");
mChart.invalidate();
pieChart.setNoDataText();
use it and u will get your desired Text also if you want some descriptive text then you can use
pieChart.setNoDataTextDescription();
First you can use:
chart.setNoDataText("Your description");
Then, you can customize through Paint
object:
mChart.setNoDataText("Description that you want");
Paint p = mChart.getPaint(Chart.PAINT_INFO);
p.setTextSize(...);
p.setColor(...);
p.setTypeface(...);
Font: MPAndroidChart - Change message "No chart data available"
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