     public init() {}
 }
 
+public class ChartDelegate {
+    
+    public var onZoom: ((scaleX: CGFloat, scaleY: CGFloat) -> Void)?
+    
+    public var onPan: ((transX: CGFloat, transY: CGFloat) -> Void)?
+}
+
 /// A Chart object is the highest level access to your chart. It has the view where all of the chart layers are drawn, which you can provide (useful if you want to position it as part of a storyboard or XIB), or it can be created for you.
 public class Chart: Pannable, Zoomable {
 

        return containerView.frame
    }
    
    /// The bounds of the chart's view
    public var bounds: CGRect {
        return self.view.bounds

        for layer in layers {
            layer.zoom(x, y: y, centerX: centerX, centerY: centerY)
        }
        delegate.onZoom?(scaleX: contentFrame.width / containerFrame.width, scaleY: contentFrame.height / containerFrame.height)
    }
    
    func onPan(deltaX: CGFloat, deltaY: CGFloat) {
        for layer in layers {
            layer.pan(deltaX, deltaY: deltaY)
        }
        delegate.onPan?(transX: contentFrame.minX, transY: contentFrame.minY)
    }

    /**
