     
     private var _lastPanPoint = CGPoint() /// This is to prevent using setTranslation which resets velocity
     
-    private var _deccelarationLastTime: NSTimeInterval = 0.0
-    private var _deccelarationDisplayLink: CADisplayLink!
-    private var _deccelarationVelocity = CGPoint()
+    private var _decelarationLastTime: NSTimeInterval = 0.0
+    private var _decelarationDisplayLink: CADisplayLink!
+    private var _decelarationVelocity = CGPoint()
     
     @objc private func tapGestureRecognized(recognizer: UITapGestureRecognizer)
     {

        _viewPortHandler.refresh(newMatrix: matrix, chart: self, invalidate: true);
    }
    
    public func stopDecceleration()
    {
        if (_deccelarationDisplayLink !== nil)
        {
            _deccelarationDisplayLink.removeFromRunLoop(NSRunLoop.mainRunLoop(), forMode: NSRunLoopCommonModes);
            _deccelarationDisplayLink = nil;
        }
    }
    
    @objc private func deccelerationLoop()
    {
        var currentTime = CACurrentMediaTime();
        
        _deccelarationVelocity.x *= _dragDeccelarationFrictionCoef;
        _deccelarationVelocity.y *= _dragDeccelarationFrictionCoef;
        
        var timeInterval = CGFloat(currentTime - _deccelarationLastTime);
        
        var distance = CGPoint(
            x: _deccelarationVelocity.x * timeInterval,
            y: _deccelarationVelocity.y * timeInterval
        );
        
        performPanChange(translation: distance);
        
        _deccelarationLastTime = currentTime;
        
        if(abs(_deccelarationVelocity.x) < 0.001 && abs(_deccelarationVelocity.y) < 0.001)
        {
            stopDecceleration();
        }
    }
    

        {
            if (_isDragging)
            {
                if (recognizer.state == UIGestureRecognizerState.Ended && isDragDecelarationEnabled)
                {
                    stopDeceleration();
                    
                    _decelarationLastTime = CACurrentMediaTime();
                    _decelarationVelocity = recognizer.velocityInView(self);
                    
                    _decelarationDisplayLink = CADisplayLink(target: self, selector: Selector("decelerationLoop"));
                    _decelarationDisplayLink.addToRunLoop(NSRunLoop.mainRunLoop(), forMode: NSRunLoopCommonModes);
                }
                
                _isDragging = false;
