Skip to content

Commit

Permalink
Fix the mess caused by the setting the min&min value of the y-axis by…
Browse files Browse the repository at this point in the history
… error :

Just simply swap their values
  • Loading branch information
potato04 committed Sep 27, 2018
1 parent ed9d70d commit 6cbecb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/Charts/Components/YAxis.swift
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ open class YAxis: AxisBase
var min = _customAxisMin ? _axisMinimum : dataMin
var max = _customAxisMax ? _axisMaximum : dataMax

min = max < min ? max : min
max = min > max ? min : max

// temporary range (before calculations)
let range = abs(max - min)

Expand Down

0 comments on commit 6cbecb8

Please sign in to comment.