Reputation: 6136
I do not see any setter methods for the “No Chart data available” text. How do I make the Text larger / smaller?
Upvotes: 3
Views: 1492
Reputation: 416
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);
Upvotes: 7
Reputation: 1615
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);
Upvotes: 1