(self, *args, **kwargs)
| 129 | class Window(QWidget): |
| 130 | |
| 131 | def __init__(self, *args, **kwargs): |
| 132 | super(Window, self).__init__(*args, **kwargs) |
| 133 | layout = QHBoxLayout(self) |
| 134 | |
| 135 | # 自定义x轴(和原来的x轴值对应等分) |
| 136 | chart = getChart("自定义x轴(和原来的x轴值对应等分)") |
| 137 | customAxisX(chart) |
| 138 | layout.addWidget(QChartView(chart, self)) |
| 139 | # 自定义添加右侧y轴(等分,与左侧不对应) |
| 140 | chart = getChart("自定义添加右侧y轴(等分,与左侧不对应)") |
| 141 | customAxisY(chart) |
| 142 | layout.addWidget(QChartView(chart, self)) |
| 143 | # 自定义top x轴(按现有新的x轴划分) |
| 144 | chart = getChart("自定义top x轴(按现有新的x轴划分)") |
| 145 | customTopAxisX(chart) |
| 146 | layout.addWidget(QChartView(chart, self)) |
| 147 | |
| 148 | |
| 149 | if __name__ == "__main__": |
nothing calls this directly
no test coverage detected