Skip to content

Commit

Permalink
Bugfix: Last label were sometimes invisible due to rounding errors
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Apr 12, 2015
1 parent 5baa99d commit 48e8a99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Charts/Classes/Utils/ChartViewPortHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,9 @@ public class ChartViewPortHandler
return _contentRect.origin.x <= x ? true : false;
}

public func isInBoundsRight(x: CGFloat) -> Bool
public func isInBoundsRight(var x: CGFloat) -> Bool
{
x = CGFloat(Int(x * 100.0)) / 100.0;
return (_contentRect.origin.x + _contentRect.size.width) >= x ? true : false;
}

Expand All @@ -313,8 +314,9 @@ public class ChartViewPortHandler
return _contentRect.origin.y <= y ? true : false;
}

public func isInBoundsBottom(y: CGFloat) -> Bool
public func isInBoundsBottom(var y: CGFloat) -> Bool
{
y = CGFloat(Int(y * 100.0)) / 100.0;
return (_contentRect.origin.y + _contentRect.size.height) >= y ? true : false;
}

Expand Down

0 comments on commit 48e8a99

Please sign in to comment.