2

I am creating a chart using MPAndroidChart with 10 data sets using one of the examples provided. My labels are displaying all on one single line and are not wrapping. They are getting chopped off on the right.

Legend l = mChart.getLegend();
l.setForm(Legend.LegendForm.SQUARE);
l.setPosition(Legend.LegendPosition.BELOW_CHART_LEFT);

I would like to display the labels in multi-lines. Any ideas please?

leppie
  • 115,091
  • 17
  • 196
  • 297
SISLAM
  • 50
  • 5
  • possible duplicate of [MPAndroidChart - Legend labels are being cut off](http://stackoverflow.com/questions/27847583/mpandroidchart-legend-labels-are-being-cut-off) – Aksel Willgert Aug 28 '15 at 15:11

1 Answers1

0

Currently this library does not support a "wrapping" mechanism for the Legend. However a workaround could be to set the legend-position to be somewhere right of the chart.

In that way there should be more space for entries when they are aligned vertically instead of horizontally.

Philipp Jahoda
  • 50,880
  • 24
  • 180
  • 187