MPAndroidChart - Change message “No chart data available”

后端 未结 6 2146
予麋鹿
予麋鹿 2020-12-29 22:22

Is there any way to change the message \"No chart data available\" when the chart is not populated?

Edit: Found the answer



        
6条回答
  •  醉话见心
    2020-12-29 22:41

    If you also want to customize look & feel, you can do it through Paint object:

    mChart.setNoDataText("Description that you want");
    Paint p = mChart.getPaint(Chart.PAINT_INFO);
    p.setTextSize(...);
    p.setColor(...);
    p.setTypeface(...);
    ... 
    

提交回复
热议问题