我没有看到“无图表数据可用”文本的任何setter方法。如何使文本变大/变小?
我没有看到“无图表数据可用”文本的任何setter方法。如何使文本变大/变小?
Paint paint = chart.getPaint(Chart.PAINT_INFO);
paint.setTextSize(yourSize);
如果您想设置文本大小、颜色和消息,可以使用以下代码。
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);