ChartsOrg / Charts

Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart.
Apache License 2.0
27.51k stars 5.99k forks source link

Feature request - custom spacing between axis and its labels #5083

Open Gargo opened 1 year ago

Gargo commented 1 year ago

Didn't found such setting. All examples use default spacing

berbaspin commented 1 year ago

You can use xOffset for leftAxis and yOffset for xAxis to add spacing.

chartOutlet.leftAxis.xOffset = 25
chartOutlet.xAxis.yOffset = 25
Gargo commented 1 year ago

Found this solution:

chart.leftAxis.xOffset = 10
chart.leftAxis.labelXOffset = -chart.leftAxis.xOffset

But it is not appropriate because labels are cut from the left side