Incorrect min/max calculation leads to invalid index access and crash
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
* [X] I've read, understood, and done my best to follow the [*CONTRIBUTING guidelines](https://github.com/jjatie/Charts/blob/master/CONTRIBUTING.md).
## What did you do?
Added line graph to a view where the graph gets continually updated with new incoming data points.
## What did you expect to happen?
The graph should be rendered and no crashes
## What happened instead?
While data points were updated a crash occured.
## Charts Environment
**Charts version/Branch/Commit Number:** 4.0.1/master/e91ba716190836b013ef8a9ca53e220ad5051e21
**Xcode version:** 12.4
**Swift version:** 5
**Platform(s) running Charts:** simulator iPad Air (4th Generation) 14.4
**macOS version running Xcode:** 10.15.6
## Example Crash Screenshot

Contributor guide
Assessment
This issue has not been assessed yet.