Conversation
If a BarChart has no printed values, the method entry.getRanges() returns null and the method ranges.length throws an exception (null.length). This can simply be prevented by asking the ranges to be not null before asking for length.
|
I really like this library and using it in my apps, I would like to call people to continue with this awesome thing. I have forked the repo and started working on it! So I am ready as well to accept pull requests, I'll notify other people from here as well! Code is full kotlin now! Make your pull requests here: |
|
Thanks a lot for this pull request, and sorry it never got merged. MPAndroidChart 4.0.0 is a complete rewrite in Kotlin (https://github.com/PhilJay/MPAndroidChart/releases/tag/v4.0.0), so this change no longer applies to the code base and I am closing it. If it is still relevant for 4.0, a new pull request against |
If a BarChart has no printed values, the method entry.getRanges() returns null and the method ranges.length throws an exception (null.length).
This can simply be prevented by asking the ranges to be not null before asking for length.
PR Checklist:
PR Description
Check array to be not null before accessing a property of null.
The BarChart does not crash if it has empty values.
It prevents a crash of the app.