Skip to content

Commit

Permalink
Merge pull request #2177 from aelam/patch-1
Browse files Browse the repository at this point in the history
Fixed the inconsistency of AxisMax and AxisMin
  • Loading branch information
danielgindi committed Feb 21, 2017
2 parents de79bab + cbead46 commit 09a89cc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Source/Charts/Charts/BarLineChartViewBase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
// execute all drawing commands
drawGridBackground(context: context)


if _autoScaleMinMaxEnabled
{
autoScale()
}

if _leftAxis.isEnabled
{
_leftYAxisRenderer?.computeAxis(min: _leftAxis._axisMinimum, max: _leftAxis._axisMaximum, inverted: _leftAxis.isInverted)
Expand All @@ -191,11 +197,6 @@ open class BarLineChartViewBase: ChartViewBase, BarLineScatterCandleBubbleChartD
_leftYAxisRenderer?.renderAxisLine(context: context)
_rightYAxisRenderer?.renderAxisLine(context: context)

if _autoScaleMinMaxEnabled
{
autoScale()
}

// The renderers are responsible for clipping, to account for line-width center etc.
_xAxisRenderer?.renderGridLines(context: context)
_leftYAxisRenderer?.renderGridLines(context: context)
Expand Down

0 comments on commit 09a89cc

Please sign in to comment.