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

前端 未结 6 774
误落风尘
误落风尘 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 08:07

    Use the @Guillaume Jounel answer and then add:

    XAxis xAxis = lineChart.getXAxis();    
    xAxis.setLabelRotationAngle(-30f);
    

提交回复
热议问题