(self, event)
| 129 | self.min_y, self.max_y = axisY.min(), axisY.max() |
| 130 | |
| 131 | def resizeEvent(self, event): |
| 132 | super(ChartView, self).resizeEvent(event) |
| 133 | # 当窗口大小改变时需要重新计算 |
| 134 | # 坐标系中左上角顶点 |
| 135 | self.point_top = self._chart.mapToPosition( |
| 136 | QPointF(self.min_x, self.max_y)) |
| 137 | # 坐标原点坐标 |
| 138 | self.point_bottom = self._chart.mapToPosition( |
| 139 | QPointF(self.min_x, self.min_y)) |
| 140 | self.step_x = (self.max_x - self.min_x) / \ |
| 141 | (self._chart.axisX().tickCount() - 1) |
| 142 | |
| 143 | def mouseMoveEvent(self, event): |
| 144 | super(ChartView, self).mouseMoveEvent(event) |
nothing calls this directly
no outgoing calls
no test coverage detected