MPAndroidChart
MPAndroidChart copied to clipboard
How to set Top Margin Between X-Axis and Labels
I want to give spacing in linechart between the labels and the X-axis, how can i achieve this ? Because at zero condition the circle and the labels are touching each other.
Take a look on this issue #4070.
You need to apply offset:
-
For Spacing between x-axis and Label:
chart.xAxis.yOffset = 10f
-
For Spacing between y-axis and Label:
chart.axisLeft.xOffset = 10f
Also You can check this Answer: https://github.com/PhilJay/MPAndroidChart/issues/4070#issuecomment-398335791