3

I do not see any setter methods for the “No Chart data available” text. How do I make the Text larger / smaller?

2 Answers 2

7

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);
Sign up to request clarification or add additional context in comments.

Comments

1

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);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.