Android-MPChartLibrary无法覆盖默认的"无图表数据可用文本"

Nin*_*der 5 android mpandroidchart

我使用Android-MPChartLibrary来显示LineChart.空视图LineChart显示"无图表数据可用"和"无数据显示"在此输入图像描述

chart.setDescription("");
chart.setNoDataTextDescription("No data to display");
Run Code Online (Sandbox Code Playgroud)

我只是想说"没有要显示的数据",但不确定它为何显示两者.

Nin*_*der 10

对我有用的是在设置所有图表数据点之后放置它.

chart.setDescription("");
chart.setNoDataText("No Chart Data"); // this is the top line
chart.setNoDataTextDescription("..."); // this is one line below the no-data-text
chart.invalidate();
Run Code Online (Sandbox Code Playgroud)