B Aristide B Aristide - 3 months ago 17
Android Question

Bar Chart how to set xAxis entries in BOTTOM and radial position

With my code the x values are positioned horizontally below my graph but I want also they are in an oblique position (or radial) and not horizontal.

XAxis xAxis = mChart.getXAxis();
xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);

Answer

You can rotate the labels of the XAxis like this:

xAxis.setLabelRotationAngle(90f);

You can find more information on this method in the XAxis documentation:

setLabelRotationAngle(float angle): Sets the angle for drawing the X axis labels (in degrees).

Comments