 import Foundation
 import CoreGraphics.CGBase
 
-public class ChartViewPortHandler
+public class ChartViewPortHandler: NSObject
 {
     /// matrix used for touch events
     private var _touchMatrix = CGAffineTransformIdentity;

        return _contentRect.origin.x <= x ? true : false;
    }
    
    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;
    }
    
    public func isInBoundsTop(y: CGFloat) -> Bool

        return _contentRect.origin.y <= y ? true : false;
    }
    
    public func isInBoundsBottom(y: CGFloat) -> Bool
    {
        let normalizedY = CGFloat(Int(y * 100.0)) / 100.0;
        return (_contentRect.origin.y + _contentRect.size.height) >= normalizedY ? true : false;
    }
    
    /// returns the current x-scale factor
