aboutsummaryrefslogtreecommitdiffstats
path: root/examples/charts/percentbarchart/percentbarchart.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/charts/percentbarchart/percentbarchart.py')
-rw-r--r--examples/charts/percentbarchart/percentbarchart.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/charts/percentbarchart/percentbarchart.py b/examples/charts/percentbarchart/percentbarchart.py
index beabe0d6c..de067455c 100644
--- a/examples/charts/percentbarchart/percentbarchart.py
+++ b/examples/charts/percentbarchart/percentbarchart.py
@@ -81,7 +81,8 @@ class MainWindow(QMainWindow):
axis = QBarCategoryAxis()
axis.append(categories)
chart.createDefaultAxes()
- chart.setAxisX(axis, series)
+ chart.addAxis(axis, Qt.AlignBottom)
+ series.attachAxis(axis)
chart.legend().setVisible(True)
chart.legend().setAlignment(Qt.AlignBottom)