我正在使用 Android-MPChartLibrary 来显示折线图。 LineChart
的空 View 显示“没有可用的图表数据”和“没有要显示的数据”
chart.setDescription("");
chart.setNoDataTextDescription("No data to display");
我只是想让它说“没有要显示的数据”,但不确定为什么它同时显示这两个。
最佳答案
对我有用的是在设置所有图表数据点之后放置它。
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();
关于Android-MPChartLibrary 无法覆盖默认值 "No Chart data available text",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31395350/