ChartsOrg / ChartsOrg/Charts

Set "CandleStickChartView.autoScaleMinMaxEnabled = true" will cause layout errors

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

Description

DGCharts version: 5.1.0
Xcode version: 16.2
Swift 5.0

The algorithm in the calcMinMaxY(entry:) function of the CandleChartDataSet class is wrong. The content of the function should be changed to

_yMin = Swift.min(e.high, _yMin)
_yMax = Swift.max(e.high, _yMax)

_yMin = Swift.min(e.low, _yMin)
_yMax = Swift.max(e.low, _yMax)

Otherwise, "CandleStickChartView.autoScaleMinMaxEnabled = true" will cause layout errors

This is the best Charts SDK I have ever used.
I hope to receive the good news of the next version with corrections as soon as possible.

Thank you.

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.