-
-
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
Invalidate method missing #2857
Comments
I was wondering the same, I have this issue on IOS charts: #2854 On Android it seems to be working fine and the only thing that is different in the code is the invalidate() function on Android. I also tried chartView.notifyDataSetChanged() and chartView.data.notifyDataChanged() but they don't seems to have the same effect as invalidate() has on Android. |
I have the graph updating by adding the new item(s) to the dataSet, then calling these 3 methods. DataSet.notifyDataSetChanged() |
As a workaround you could call |
Solution by @adamstener works. As a matter of fact, only
|
But I found one improve here is not to loop all the time. |
|
Ok, what worked me – I just cleared the array before adding new entries. dataEntries.removeAll() |
This repo leaves the documentation up to the Android version of Charts, which is very similar, but with dynamic data or data refreshing, the Android repo says to call invalidate on the chart. There is no such method on this repo. How does one refresh the graph after modifying the data or dataset? Calling notify does not seem to do the trick.
The text was updated successfully, but these errors were encountered: