ChartsOrg / ChartsOrg/Charts

Data Sorting does not prevent Fatal error: Can't form Range with upperBound < lowerBound error on Candle Chart

Open
#4,656 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Swift
Stars
28k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

## What did you do?

ℹ Filled CandleStick Chart Entry with Data Promise-Kit fetch request with format as follows :

[ChartDataEntry, x: 1.0, y 2482.9300000000003, ChartDataEntry, x: 2.0, y 2484.6075, ChartDataEntry, x: 3.0, y 2489.7675, ChartDataEntry, x: 4.0, y 2481.95, ChartDataEntry, x: 5.0, y 2474.12, ChartDataEntry, x: 6.0, y 2477.48695, ChartDataEntry, x: 7.0, y 2477.65, ChartDataEntry, x: 8.0, y 2473.215, ChartDataEntry, x: 9.0, y 2482.85]

from data received from Backend response which is in the format as follows :
"date": "2021-05-27",
"open": "2436.9400",
"high": "2440.0000",
"low": "2402.0000",
"close": "2402.5100",
"volume": "1948113"

## What did you expect to happen?

ℹ I've heard that the dataset sorting is a hidden requirement, so i sorted my Candle Chart Values before allocating it unto my set as follows :

self.stockModel.append(contentsOf: data)
for _ in 0..

Contributor guide

Open the contributing guide

Research direction

Reproduce the crash with the supplied CandleChartDataEntry values and the call to setCandleData(chartValuez:). Start by tracing the Candle Chart zoom/scroll path that forms the invalid range; no source file or test is named in the report. Done means the same dataset no longer crashes when the chart is zoomed or scrolled.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
data-visualization, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.