@Override
        public void mouseDragged(MouseEvent e) {
        	System.out.println("Mouse dragged");
        	int currX = e.getX();
        	int currY = e.getY();
        	
        	System.out.println("Start X: " + startX + "CurrX: " + e.getX());
        	
        	System.out.println("startX - currX = " + (startX-e.getX()));
        	
        	//if (!dragging && Math.abs(startX-e.getX()) > 10)
        	if (!dragging && (Math.sqrt(Math.pow(currX-startX, 2) + Math.pow(currY-startY, 2)) > 10))
        	{
        		dragging = true;
        		lastX = startX;
        		lastY = startY;
        	}
        	if (dragging) {
            	super.mouseDragged(e);
            	int mouseX = e.getX();
            	int mouseY = e.getY();
            	System.out.println("New X: " + mouseX + " New Y: " + mouseY);
                Rectangle2D plotRectangle = chartPanel.getChartRenderingInfo().getPlotInfo().getDataArea();
                if (mouseX >= plotRectangle.getX() && mouseX <= (plotRectangle.getX() + plotRectangle.getWidth())) {
                	System.out.println("Dragging on plot area");
                }
                
                changeXAxis(lastX-currX, plotRectangle.getWidth());
                changeYAxis(lastY-currY, plotRectangle.getHeight());
            }
        	
        	lastX = currX;
        	lastY = currY;
        }