I am using MPAndroidChart library for my project. Is it possible to rotate the labels of the XAxis by 270 degrees so that I can fit more text?
Asked
Active
Viewed 2,330 times
9
-
Have u implemented this xlabel rotations in bar chart? – Amrut Bidri Oct 07 '15 at 06:43
2 Answers
11
Original answer:
Unfortunately it is currently not possible to rotate the values on the x-axis of a chart to a certain degree / angle. You will have to implement such a feature yourself.
UPDATE:
As of v2.1.5 this feature is now available:
XAxis xAxis = chart.getXAxis();
xAxis.setLabelRotationAngle(...);

Philipp Jahoda
- 50,880
- 24
- 180
- 187
3
do it simply by
XAxis xAxis=barChart.getXAxis();
xAxis.setLabelRotationAngle(-45);

Rahul M Mohan
- 293
- 1
- 3
- 12