(self, *args, **kwargs)
| 29 | class Window(QChartView): |
| 30 | |
| 31 | def __init__(self, *args, **kwargs): |
| 32 | super(Window, self).__init__(*args, **kwargs) |
| 33 | self.resize(400, 300) |
| 34 | # 抗锯齿 |
| 35 | self.setRenderHint(QPainter.Antialiasing) |
| 36 | |
| 37 | # 图表 |
| 38 | chart = QChart() |
| 39 | self.setChart(chart) |
| 40 | # 设置标题 |
| 41 | chart.setTitle('Simple splinechart example') |
| 42 | # 添加Series |
| 43 | self.getSeries(chart) |
| 44 | # 创建默认xy轴 |
| 45 | chart.createDefaultAxes() |
| 46 | chart.legend().setVisible(False) |
| 47 | |
| 48 | def getSeries(self, chart): |
| 49 | # 第一组 |