Skip to content

Commit

Permalink
Bound check for horizontal bars was wrong (Fixed issue #211)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Jul 16, 2015
1 parent 2792408 commit a2d7188
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Charts/Classes/Renderers/HorizontalBarChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ public class HorizontalBarChartRenderer: BarChartRenderer

trans.rectValueToPixel(&barRect)

if (k == 0 && !viewPortHandler.isInBoundsLeft(barRect.origin.x + barRect.size.width))
if (k == 0 && !viewPortHandler.isInBoundsTop(barRect.origin.y + barRect.size.height))
{
// Skip to next bar
break
}

// avoid drawing outofbounds values
if (!viewPortHandler.isInBoundsRight(barRect.origin.x))
if (!viewPortHandler.isInBoundsBottom(barRect.origin.y))
{
break
}
Expand Down

0 comments on commit a2d7188

Please sign in to comment.