-
-
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
range, and therefore interval, is NaN in computeAxisValues #2845
Comments
You don't debug and walk through ChartsDemo very well, it's wrong calling Never init an empty chart data because a lot of calculation involved in data setter. Another thing is I am going to close your PR as well, since we don't want to silent the mistakes people made or a true bug. |
If initializing the chart with empty data is leading to problems, then perhaps a better design would be to either prevent doing so, or check if the data is empty before doing any calculations. I use the same logic in an Android app using MPAndroidChart library and have not run into that issue there. |
I admit. It's a bit tricky here. the data setter has been modified several times to avoid different issues. |
For some reason min and max in computeAxis are NaN, which causes a problem with calculating range and interval in computeAxisValues (as referenced in my PR).
Here is a piece of code that breaks every time (after calling reloadDataTap).
The text was updated successfully, but these errors were encountered: