Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android-MPChartLibrary unable to override default "No Chart data available text"

I am using Android-MPChartLibrary for showing a LineChart. Empty view for LineChart is showing "No chart data available" and "No data to display"enter image description here

chart.setDescription("");
chart.setNoDataTextDescription("No data to display");

I just want it to say "No data to display" but not sure why it is showing both.

like image 816
NinjaCoder Avatar asked Jul 13 '15 23:07

NinjaCoder


Video Answer


1 Answers

What worked for me was putting this after setting all the chart data points.

chart.setDescription("");
chart.setNoDataText("No Chart Data"); // this is the top line
chart.setNoDataTextDescription("..."); // this is one line below the no-data-text
chart.invalidate();
like image 145
NinjaCoder Avatar answered Sep 29 '22 22:09

NinjaCoder