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

Updating data in LineChart takes up to 30 seconds #3064

Closed
cbgrey opened this issue Dec 2, 2017 · 1 comment
Closed

Updating data in LineChart takes up to 30 seconds #3064

cbgrey opened this issue Dec 2, 2017 · 1 comment

Comments

@cbgrey
Copy link

cbgrey commented Dec 2, 2017

I have a view with a line chart on it and it displays initial data immediately from viewDidLoad(). However, if I update the chart later after an API call is complete, changes to the line chart data can take 30 seconds to be seen.

I am updating the chart via:
chart.data = new_data

Time to update is not affected by the number of new or existing data points. I've tried between 2 and 100 data points.

Calling notifyDataSetChanged() has no affect.

I cannot see what the chart object is doing during the time I am waiting for the update to be reflected.

@cbgrey
Copy link
Author

cbgrey commented Dec 3, 2017

Developer failure. I was calling the update on a background thread. Moved the update to the main/UI thread and all works as expected.

@cbgrey cbgrey closed this as completed Dec 3, 2017
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

1 participant