Bar chart crashes when two data sets have different numbers of entries
- Dominant language
- Swift
- Stars
- 28k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
* [✅ ] 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?
1. Create a `BarChart`
2. Create two data sets, each with a different number of entries.
3. Put the two data sets into a `BarChartData` class.
4. Load the `BarChartData` into the `BarChart`
5. Display the `BarChart` on the screen.
## What did you expect to happen?
I expect the bar chart to display correctly on the screen.
## What happened instead?
The Charts library crashed my application.
## Charts Environment
**Charts version/Branch/Commit Number:** 4.0.1 release
**Xcode version:** 12.4 12D4e
**Swift version:** 5.1
**Platform(s) running Charts:** iOS
**macOS version running Xcode:**
## Demo Project
https://github.com/fire-at-will/charts-bug
## Screenshot
https://imgur.com/a/8VQl6PA
## Fix
A PR fixing this issue has been submitted: https://github.com/danielgindi/Charts/pull/4634
Update April 25, 2021: Added PR fix link.
Contributor guide
Assessment
This issue has not been assessed yet.