diff --git a/Source/Charts/Components/YAxis.swift b/Source/Charts/Components/YAxis.swift index 6a1b314072..05232e6579 100644 --- a/Source/Charts/Components/YAxis.swift +++ b/Source/Charts/Components/YAxis.swift @@ -156,10 +156,12 @@ open class YAxis: AxisBase if _customAxisMax && _customAxisMin { (min, max) = (max, min) - } else if _customAxisMax && !_customAxisMin + } + else if _customAxisMax && !_customAxisMin { min = max - 1 - } else if !_customAxisMax && _customAxisMin + } + else if !_customAxisMax && _customAxisMin { max = min + 1 }