I do not see any setter methods for the “No Chart data available” text. How do I make the Text larger / smaller?
In Chart class, one can see it's drawn via PAINT_INFO
First, retrieve the paint object, then style it as you want:
Paint paint = chart.getPaint(Chart.PAINT_INFO);
paint.setTextSize(yourSize);
Textsize,textcolor,text message setting,use below code.
Typeface tf = Typeface.createFromAsset(getContext().getAssets(), "RockwellStd.otf");
barChart.setNoDataText("Your message what you want to dispaly");
Paint p = barChart.getPaint(Chart.PAINT_INFO);
p.setTextSize(18);
p.setColor(Color.parseColor("#701112"));
p.setTypeface(tf);
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