Mike6679
Mike6679

Reputation: 6136

Android-MPChartLibrary “No Chart data available” Text size

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

Answers (2)

00seb
00seb

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

Sunisha Guptan
Sunisha Guptan

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

Related Questions