1
votes

I am using the MPAndroidChart library, it will automatically generate legend labels, then I used chart.getLegend().setEnable(false), it all invisible. How can I do to let some of the labels invisible?

1

1 Answers

4
votes

LineDataSet can conrtol individual Legends.

LineDataSet lineDataSet = new LineDataSet(entryList, "FirstLegend");

Inorder to make the legend label invisible , use the below code

lineDataSet.setLabel("");

Inorder to make the legend form invisible, use the below code

lineDataSet.setForm(Legend.LegendForm.NONE);