got the following code:
Legend legend = mChart.getLegend();
legend.setLabels(new String[]{"aaaaa", "bbbbb", "ccccc"});
This setting does not take effect Is there an other way to set the text ?
I could not find the method setCustom(int[] color, String[] labels) in v3.0.0. Only setCustom(LegendEntry[]) for which you have to pass LegendEntry objects.
List<LegendEntry> entries = new ArrayList<>();
for (int i = 0; i < titleList.size(); i++) {
LegendEntry entry = new LegendEntry();
entry.formColor = colorList.get(i);
entry.label = titleList.get(i);
entries.add(entry);
}
legend.setCustom(entries);