-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Custom offsets #562
Comments
try these: /// An extra offset to be appended to the viewport's top
public var extraTopOffset: CGFloat = 0.0
/// An extra offset to be appended to the viewport's right
public var extraRightOffset: CGFloat = 0.0
/// An extra offset to be appended to the viewport's bottom
public var extraBottomOffset: CGFloat = 0.0
/// An extra offset to be appended to the viewport's left
public var extraLeftOffset: CGFloat = 0.0 They are used before restrainViewPort: offsetTop += self.extraTopOffset
offsetRight += self.extraRightOffset
offsetBottom += self.extraBottomOffset
offsetLeft += self.extraLeftOffset
_viewPortHandler.restrainViewPort(
offsetLeft: max(self.minOffset, offsetLeft),
offsetTop: max(self.minOffset, offsetTop),
offsetRight: max(self.minOffset, offsetRight),
offsetBottom: max(self.minOffset, offsetBottom)) |
ah, sorry, I notice there is a max for it. minOffset is 10.0. Then you can simply call It's a little tricky here.. @danielgindi what do you think |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There always seem to be a 10 point offset on the left and right of my charts and can't figure out how to set this to 0.
I've tried to following but couldn't get it to work:
Does anyone know how to work this out?
Cheers
The text was updated successfully, but these errors were encountered: