XAxis Label Corner in MPAndroidChart

I am using the MPAndroidChart library for my project. Is it possible to rotate XAxis labels 270 degrees so that I can fit more text?

+5
source share
2 answers

Original answer:

Unfortunately, it is currently not possible to rotate values ​​on the x-axis of a chart to a certain degree / angle. You will need to implement such a function yourself.

UPDATE:

Starting with v2.1.5, this feature is now available:

XAxis xAxis = chart.getXAxis(); xAxis.setLabelRotationAngle(...); 
+4
source

just do it

  XAxis xAxis=barChart.getXAxis(); xAxis.setLabelRotationAngle(-45); 
+2
source

Source: https://habr.com/ru/post/1208394/


All Articles