MPAndroidChart icon indicating copy to clipboard operation
MPAndroidChart copied to clipboard

How to set Top Margin Between X-Axis and Labels

Open vksingh225 opened this issue 6 years ago • 2 comments

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. line-chart

vksingh225 avatar Sep 18 '17 07:09 vksingh225

Take a look on this issue #4070.

bogdan-evtushenko avatar Jan 05 '21 09:01 bogdan-evtushenko

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

jay43 avatar Oct 11 '22 03:10 jay43