-
Notifications
You must be signed in to change notification settings - Fork 472
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
Scroll after create Graph #16
Comments
Same problem here. |
Just figured it out. You can change the scroll direction: graphView.direction = ScrollableGraphViewDirection.RightToLeft RightToLeft will automatically scroll to the end of the graph . |
Hi hdoria! I tried this line of code but It doesn't work for me 😟 `let graphView = ScrollableGraphView(frame: CGRectMake(0.0, 0.0, self.frame.width, self.frame.height))
|
@hdoria Yes! That property can be used to change which end of the graph it starts at. @llKoull Try changing:
to
I don't think you have declared graphView as an optional. Otherwise I can't see any other major mistakes. Does it not start at the end of the graph even after changing the direction to .RightToLeft? (Note there is no scrolling animation for this property, it will just start at the end of the graph and the user will have to swipe to the left to see the start of the graph.) |
Hi @philackm ! I tried to use
I always have to scroll from left to right no matters which direction i choose :O Thanks for your help |
I finally got this working, It was my fault, I was using But now i've got another problem, The graph is scrolling, that's nice! ^_^ but the graphic it's not filled with color It seems that only half part of the graphic is filled until i touch It (some lines and the Y-axis values are also hidden. If i touch the graph It fills up with the correct color). I attach some pictures! Thanks and best regards! |
Hmmm. Could you post the code you have to a GitHub gist (https://gist.github.com) and then post the link here? I'd like to try reproduce it and find what's causing the bug.
|
I'm sorry, but i can't post all the code. Anyways, I can tell you what i've done. I created a UICollectionView with a custom cell called GraphCollectionViewCell. This is the code of the custom cell: `import UIKit class GraphCollectionViewCell: UICollectionViewCell {
} Then I initialize the cell in the main view using the function
with the following code:
I think that I autolayout can be affecting to the view. Thanks for your help! |
Same problem here. This only happens when using ScrollableGraphViewDirection.RightToLeft. |
Yeah! It's working perfect! ^_^ Thanks @philackm !!! |
Hello!
First of all I want to thank you about this awesome library! I'm using it in a new project and It's really smooth. I only have one question. Is it posible to automatically scroll to the end of the graph after it appears on the view?
Best regards!
The text was updated successfully, but these errors were encountered: