Skip to content

Commit

Permalink
Corrected calcMinMaxY for autoScaleMinMax (Closes #1442)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Oct 8, 2016
1 parent 61d10ba commit 695a11f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,30 @@ open class CandleChartDataSet: LineScatterCandleRadarChartDataSet, ICandleChartD
calcMinMaxX(entry: e)
}

open override func calcMinMaxY(entry e: ChartDataEntry)
{
guard let e = e as? CandleChartDataEntry
else { return }

if e.high < _yMin
{
_yMin = e.high
}
if e.high > _yMax
{
_yMax = e.high
}

if e.low < _yMin
{
_yMin = e.low
}
if e.low > _yMax
{
_yMax = e.low
}
}

// MARK: - Styling functions and accessors

/// the space between the candle entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ open class ChartDataSet: ChartBaseDataSet
}
}

internal func calcMinMaxY(entry e: ChartDataEntry)
open func calcMinMaxY(entry e: ChartDataEntry)
{
if e.y < _yMin
{
Expand Down

0 comments on commit 695a11f

Please sign in to comment.