         }
     }
     
+    public override func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool
+    {
+        if (!super.gestureRecognizerShouldBegin(gestureRecognizer))
+        {
+            return false;
+        }
+        
+        if (gestureRecognizer == _panGestureRecognizer)
+        {
+            if (_dataNotSet || !_dragEnabled || !self.hasNoDragOffset ||
+                (self.isFullyZoomedOut && !self.isHighlightPerDragEnabled))
+            {
+                return false;
+            }
+        }
+        else if (gestureRecognizer == _pinchGestureRecognizer)
+        {
+            if (_dataNotSet || (!_pinchZoomEnabled && !_scaleXEnabled && !_scaleYEnabled))
+            {
+                return false;
+            }
+        }
+        
+        return true;
+    }
+    
     public func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool
     {
-        if ((gestureRecognizer.isKindOfClass(UIPinchGestureRecognizer) && otherGestureRecognizer.isKindOfClass(UIPanGestureRecognizer)) || (gestureRecognizer.isKindOfClass(UIPanGestureRecognizer) && otherGestureRecognizer.isKindOfClass(UIPinchGestureRecognizer)))
+        if ((gestureRecognizer.isKindOfClass(UIPinchGestureRecognizer) &&
+            otherGestureRecognizer.isKindOfClass(UIPanGestureRecognizer)) ||
+            (gestureRecognizer.isKindOfClass(UIPanGestureRecognizer) &&
+                otherGestureRecognizer.isKindOfClass(UIPinchGestureRecognizer)))
         {
             return true;
+        }
+        
+        if (gestureRecognizer.isKindOfClass(UIPanGestureRecognizer) &&
+            otherGestureRecognizer.isKindOfClass(UIPanGestureRecognizer) && (
+                gestureRecognizer == _panGestureRecognizer
+            ))
+        {
+            var scrollView = self.superview;
+            while (scrollView !== nil && !scrollView!.isKindOfClass(UIScrollView))
+            {
+                scrollView = scrollView?.superview;
+            }
+            var foundScrollView = scrollView as? UIScrollView;
+            
+            if (foundScrollView !== nil && !foundScrollView!.scrollEnabled)
+            {
+                foundScrollView = nil;
+            }
+            
+            var scrollViewPanGestureRecognizer: UIGestureRecognizer!;
+            
+            if (foundScrollView !== nil)
+            {
+                for scrollRecognizer in foundScrollView!.gestureRecognizers as! [UIGestureRecognizer]
+                {
+                    if (scrollRecognizer.isKindOfClass(UIPanGestureRecognizer))
+                    {
+                        scrollViewPanGestureRecognizer = scrollRecognizer as! UIPanGestureRecognizer;
+                        break;
+                    }
+                }
+            }
+            
+            if (otherGestureRecognizer === scrollViewPanGestureRecognizer)
+            {
+                _outerScrollView = foundScrollView;
+                
+                return true;
+            }
         }
         
         return false;

    public var highlightPerDragEnabled = true
    
    /// If set to true, highlighting per dragging over a fully zoomed out chart is enabled
    /// :default: true
    public var isHighlightPerDragEnabled: Bool
    {

                
                _isDragging = false;
            }
            
            if (_outerScrollView !== nil)
            {
                _outerScrollView?.scrollEnabled = true;
                _outerScrollView = nil;
            }
        }
    }
    
    private func performPanChange(var #translation: CGPoint) -> Bool
    {
        if (isAnyAxisInverted && _closestDataSetToTouch !== nil
            && getAxis(_closestDataSetToTouch.axisDependency).isInverted)
