Skip to content

Commit

Permalink
Fixed a bug in horz-bar where drawValueAboveBar were ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Jun 30, 2015
1 parent 63ece76 commit b2d35ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Charts/Classes/Renderers/HorizontalBarChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ public class HorizontalBarChartRenderer: BarChartRenderer
var drawValueAboveBar = delegate!.barChartIsDrawValueAboveBarEnabled(self)
var drawValuesForWholeStackEnabled = delegate!.barChartIsDrawValuesForWholeStackEnabled(self)

var textAlign = drawValueAboveBar ? NSTextAlignment.Left : NSTextAlignment.Right
let textAlign = drawValueAboveBar ? NSTextAlignment.Left : NSTextAlignment.Right

let valueOffsetPlus: CGFloat = 5.0
var posOffset: CGFloat
Expand Down Expand Up @@ -320,7 +320,7 @@ public class HorizontalBarChartRenderer: BarChartRenderer
xPos: valuePoints[j].x + (val >= 0.0 ? posOffset : negOffset),
yPos: valuePoints[j].y + yOffset,
font: valueFont,
align: .Left,
align: textAlign,
color: valueTextColor)
}
}
Expand Down Expand Up @@ -372,7 +372,7 @@ public class HorizontalBarChartRenderer: BarChartRenderer
xPos: valuePoints[j].x + (val >= 0.0 ? posOffset : negOffset),
yPos: valuePoints[j].y + yOffset,
font: valueFont,
align: .Left,
align: textAlign,
color: valueTextColor)
}
else
Expand Down Expand Up @@ -441,7 +441,7 @@ public class HorizontalBarChartRenderer: BarChartRenderer
xPos: x,
yPos: y + yOffset,
font: valueFont,
align: .Left,
align: textAlign,
color: valueTextColor)
}
}
Expand Down

0 comments on commit b2d35ed

Please sign in to comment.