

def onClick(self, event):
    x = self.getXAxis().getMouseCoordinate()
    y = self.getYAxis().getMouseCoordinate()
    if self.altPressed:
        self.getXAxis().setAxisMin((0.25 * N_POINTS))
        self.getXAxis().setAxisMax((0.75 * N_POINTS))
        self.getYAxis().setAxisMin((- 0.5))
        self.getYAxis().setAxisMax(0.5)
        self.getCurve(self.SELECTION_CURVE).setVisible(False)
        x.update()
    elif self.getCurve(self.SELECTION_CURVE).isVisible():
        self.p1.x = self.p2.x = x
        self.p1.y = self.p2.y = y
        self.getCurve(self.SELECTION_CURVE).setVisible(False)
        self.update()
    else:
        xMin = self.getXAxis().getAxisMin()
        xMax = self.getXAxis().getAxisMax()
        yMin = self.getYAxis().getAxisMin()
        yMax = self.getYAxis().getAxisMax()
        self.p1.x = (x - ((xMax - xMin) / 4))
        self.p2.x = (x + ((xMax - xMin) / 4))
        self.p1.y = (y - ((yMax - yMin) / 4))
        self.p2.y = (y + ((yMax - yMin) / 4))
        moving = selecting = False
        self.zoomIndex = 0
        self.getCurve(self.SELECTION_CURVE).setVisible(True)
        self.updateCursor()
    self.moving = self.selecting = False

dataset/ETHPy150Open anandology/pyjamas/examples/gcharttestapp/GChartExample24.py GChartExample24.onClick/VarMisuse@112/151 `self`->`x`