Charts icon indicating copy to clipboard operation
Charts copied to clipboard

fix crash max < min when entryTo is not found

Open sebastienhannay opened this issue 2 years ago • 3 comments

Issue Link :link:

https://github.com/danielgindi/Charts/issues/4798

Goals :soccer:

Fix the crash when entry to is not found max can be lower than min. It's not a perfect fix as I still have issue with fill under charts line. Would probably be better to fix the entryForXValue returning nil instead

Implementation Details :construction:

As entryFrom is found but entryTo is not min may be higher than max. Just use the last index of datset instead of 0 to make sure max is always bigger than min

Testing Details :mag:

Run integration into my app and the app doesn't crash anymore while building the chart.

sebastienhannay avatar Apr 06 '22 11:04 sebastienhannay

Is this fix related?

PWrzesinski avatar May 24 '22 13:05 PWrzesinski

Nice work, solved the issue for me :)

playtopro avatar Jun 09 '22 06:06 playtopro

hi can we merge this ?

martinkaplan avatar Jun 09 '22 12:06 martinkaplan