Mpandroidchart: 如何能够显示小比例而不使标签重叠?

Created on 13 Apr 2018  ·  2Comments  ·  Source: PhilJay/MPAndroidChart

虽然说多了必然重叠,但要是不多,小比例的比较多,标签还是会重叠,请问怎么解决?

Most helpful comment

I don't speak chinese, but I hope Google Translate can help us both.

I think you're problem is that the labels are overlapping. As @rainbow7 said, try using...

chart.getXAxis().setLabelRotationAngle(45f)

to rotate the labels. If you don't want to do that, you can easily reduce the labels drawn with

chart.getXAxis().setLabelCount(5, false)

to draw only 5 labels, but to also allow the renderer to draw more or less if there is space to do so.

I'm going to close this issue for now, if you still need help then feel free to comment on this and I'll come running back 👍

All 2 comments

Maybe you can do it like this
chart.getXAxis().setLabelRotationAngle(70)

I don't speak chinese, but I hope Google Translate can help us both.

I think you're problem is that the labels are overlapping. As @rainbow7 said, try using...

chart.getXAxis().setLabelRotationAngle(45f)

to rotate the labels. If you don't want to do that, you can easily reduce the labels drawn with

chart.getXAxis().setLabelCount(5, false)

to draw only 5 labels, but to also allow the renderer to draw more or less if there is space to do so.

I'm going to close this issue for now, if you still need help then feel free to comment on this and I'll come running back 👍

Was this page helpful?
0 / 5 - 0 ratings

Related issues

botondbutuza picture botondbutuza  ·  3Comments

AndroidJiang picture AndroidJiang  ·  3Comments

AiTheAnswer picture AiTheAnswer  ·  3Comments

vishvendu picture vishvendu  ·  3Comments

ChenZeFengHi picture ChenZeFengHi  ·  3Comments