Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a padding on the xAxis, only on the values not on the Graph #4404

Open
Cublax opened this issue Jun 30, 2020 · 1 comment
Open

add a padding on the xAxis, only on the values not on the Graph #4404

Cublax opened this issue Jun 30, 2020 · 1 comment

Comments

@Cublax
Copy link

Cublax commented Jun 30, 2020

I am trying to find a solution to add a padding on the xAxis.

I DO NOT WANT TO CHANGE ANYTHING OF THE GRAPH ITSELF

My view looks like this :
Simulator Screen Shot - iPhone 11 Pro Max - 2020-06-30 at 14 08 23

As you can see the dates values are out of the graph. I would like to do recenter the the values on this axis.

When I call chartView.xAxis.avoidFirstLastClippingEnabled = true it does the work on one sidesuch as follow:
Simulator Screen Shot - iPhone 11 Pro Max - 2020-06-30 at 14 17 30

However it's not effective on the other side, plus the values do not have the right spacing anymore.

What could some my problem is to have an equivalent of this, only effective for those dates :

chartView.setExtraOffsets(left: 36, top: 0, right: 36, bottom: 40)

I would be happy hear any kind of solution I am getting desperate on this.
Thanks for helping

@Planet30
Copy link

I had a similar but not exactly the same issue. I am using SwiftUI and use the padding on the full chart rather than on the axis itself:
See details and a code snippet here: #4405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants