ChartsOrg / ChartsOrg/Charts

crashes when autoScaleMinMaxEnabled == true and no entry in visibleRange

Open
#2,376 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

It happens when I do like this
1. `autoScaleMinMaxEnabled = true` and `axisMinimum = 0`;
```
_chartView.xAxis.axisMinimum = 0;
_chartView.autoScaleMinMaxEnabled = true;
```
2. drag/zoom enabled
3. drag the chart til visibleXRange is 0~29

I believe that the YAxis gets NaN range because there is no entries for calculating.
Now I have to check the data when chart range changed, and set a good range to it, to keep chart displaying with no data and with no crash.

If you have any idea to check or set the YAxis range to make sure it won't get crashed?

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.