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

Charts stuttering when reloaded #201

Closed
BrandonShega opened this issue Jul 9, 2015 · 3 comments
Closed

Charts stuttering when reloaded #201

BrandonShega opened this issue Jul 9, 2015 · 3 comments

Comments

@BrandonShega
Copy link

Hello,

So I don't know if I'm just doing this wrong or what but I can not figure this out. I had a quick question though is there a method for the iOS version like the Android invalidate()?

Anyways, the problem I am running into is I have 8 cells in a collection view with a chart in every one, and I have tried everything under the sun to get the chart to not stutter.

These are the scenarios I have seen:
The chart still has the data when it is made, so it flashes on the screen and then animates.
The chart has another cell's old chart and then flashes on the screen before the new one animates.

Is there a way to just have the graph redraw with new data without having the chart just drawn first and then animated? I have tried hiding the chart and then displaying right before animation but it seems like it is already drawn and then animates, causing it to look like it is stuttering.

Thanks!

@danielgindi
Copy link
Collaborator

Have you tried setNeedsDisplay?

@BrandonShega
Copy link
Author

Do I do this when I change the data or before the graph is drawn?

@BrandonShega
Copy link
Author

If I override prepareForReuse in the cell, is it possible to wipe out all data for the graph or something like that?

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