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

Aligning X-axis, padding? #43

Closed
simonbromberg opened this issue Apr 25, 2014 · 8 comments
Closed

Aligning X-axis, padding? #43

simonbromberg opened this issue Apr 25, 2014 · 8 comments

Comments

@simonbromberg
Copy link

Are there any methods to set the padding on the line chart so as to align the points with an X-axis (or Y-axis) labeling?
Thanks

@terryworona
Copy link
Collaborator

Padding is currently private atm.

We could potentially expose this, but I'd really rather keep it private.

If you want, go ahead and modify the following (private) function to meet your needs:

- (CGFloat)padding

@simonbromberg
Copy link
Author

Does it apply the same padding all around the chart?

@terryworona
Copy link
Collaborator

It's dynamic based on the thickest line or thickest rot radius.

padding = MAX(thickestLine.width, thickestDot.radius) * 0.5;

@simonbromberg
Copy link
Author

But is this only the padding on the left and right?

@terryworona
Copy link
Collaborator

All around the chart (left, top, right, bottom) since a line or dot can be on any given edge

@terryworona
Copy link
Collaborator

Just replace - (CGFloat)padding with:

- (CGFloat)padding { return 0; }

If you don't want any padding.

@simonbromberg
Copy link
Author

Well I just want to adjust the left and right padding so that the x-axis labels I added line up properly.
What's the header padding for then?

@terryworona
Copy link
Collaborator

The vertical padding between the header and highest chart point (bar, line, etc).

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