how to mpchart legend text Color change in android

18 Views Asked by At

When I googled the information, it said that I could use setCustom.

Only form, not label text is allowed in the entry in this section.

What I want is to make the legend's form color and label color the same. how to mpchart label text change?

legend.textColor can also only specify one color.

enter image description here

val entries: MutableList<LegendEntry> = ArrayList()
                                        for (i in 0 until strLegendList.size) {
                                            val entry = LegendEntry()
                                            entry.formColor = colorList[i]
                                            entry.label = strLegendList[i]

                                            entries.add(entry)
                                            legend.textColor = colorList[i]
                                            legend.setCustom(entries)
                                        }
0

There are 0 best solutions below