ChartsOrg / ChartsOrg/Charts

Incorrect min/max calculation leads to invalid index access and crash

Open
#4,614 0 comments 0 reactions 0 assignees View on GitHub
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

![image](https://user-images.githubusercontent.com/11895736/112913675-c4b95180-912c-11eb-8486-1e69cd843fa0.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.