In MPAndroidChart Library, How to wrap X Axis Labels to two lines when long?

前端 未结 6 739
误落风尘
误落风尘 2020-12-05 07:32

I am trying to show X axis label to go to 2 lines when they are long. How to achieve this in LineChart? See screenshot below. I want time to go to second line instead of sta

6条回答
  •  無奈伤痛
    2020-12-05 07:54

    This looks like something that you will have to implement yourself by modifying the library to your needs.

    It is currently not possible by default to have multiple lines on the x-axis. The reason therefore is that Android Canvas cannot simply plot a string e.g. like this "Line 1\nLine2" as two lines.

提交回复
热议问题