Mpandroidchart: How to adjust the text size of no data?

Created on 3 Mar 2017  路  3Comments  路  Source: PhilJay/MPAndroidChart

hello :)
I want to increase the size of the text when there is no data,

mBar.setNoDataText();

It only comes up with what text to write.

Paint p = mBar.getPaint(Chart.PAINT_INFO);
p.setTextSize(20f);

I tried the paint () line as above, but the text size did not get bigger.
Is there a way to apply it separately?
Does anyone know how to resize nodata text?

Most helpful comment

I found the solution:
mChart.getPaint(Chart.PAINT_INFO).setTextSize(Utils.convertDpToPixel(17f));
Use this code to change textSize.

All 3 comments

I have same problem. I want to resize but i can't. I have tried with setNoDataTextTypeface but no result. Somebody know how to resize?

I found the solution:
mChart.getPaint(Chart.PAINT_INFO).setTextSize(Utils.convertDpToPixel(17f));
Use this code to change textSize.

Thank you very much @nen155, it works great.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DarkHelmet67 picture DarkHelmet67  路  3Comments

AiTheAnswer picture AiTheAnswer  路  3Comments

galex picture galex  路  3Comments

chathudan picture chathudan  路  3Comments

AndroidJiang picture AndroidJiang  路  3Comments