Skip to content

Commit

Permalink
update offset calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
potato04 committed Sep 28, 2018
1 parent daff645 commit a77a358
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Charts/Renderers/BarChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ open class BarChartRenderer: BarLineScatterCandleBubbleRenderer
if let offsetView = dataProvider as? BarChartView
{
let offsetAxis = dataSet.axisDependency == .left ? offsetView.leftAxis : offsetView.rightAxis
if barData.yMin > 0
if offsetAxis.axisMinimum > 0
{
heightOffset = CGFloat(offsetAxis.axisMinimum)
}
if barData.yMax < 0
if offsetAxis.axisMaximum < 0
{
originYOffset = CGFloat(offsetAxis.axisMaximum)
}
Expand Down

0 comments on commit a77a358

Please sign in to comment.