aboutsummaryrefslogtreecommitdiffstats
path: root/examples/charts
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-28 12:51:18 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2023-09-28 11:33:07 +0000
commitfc34925c835a8b04d68e5d65bd653283c9a02043 (patch)
tree9f9999e067c6ab1e429d04b2cfa7d96ffb00cd91 /examples/charts
parent08d36a04f2a09716d24a2122e97c64b2165700ac (diff)
Fix animations of the chart themes example
Amends 66f7f1fc866dd19aa5a86164d93a7b9a50e07af6. Pick-to: 6.6 6.5 6.5.3 Task-number: PYSIDE-2425 Change-Id: I5cd225de9ae7fbd666d13892cdd8a78b21c9054e Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Diffstat (limited to 'examples/charts')
-rw-r--r--examples/charts/chartthemes/main.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/examples/charts/chartthemes/main.py b/examples/charts/chartthemes/main.py
index 192382a98..28c819c16 100644
--- a/examples/charts/chartthemes/main.py
+++ b/examples/charts/chartthemes/main.py
@@ -302,20 +302,10 @@ class ThemeWidget(QWidget):
options = self.ui.animatedComboBox.itemData(idx)
if len(self.charts):
- chart = self.charts[0].chart()
- animation_options = chart.animationOptions()
+ animation_options = self.charts[0].chart().animationOptions()
if animation_options != options:
for chart_view in self.charts:
- options_name = QChart.NoAnimation
- if options == 0:
- options_name = QChart.NoAnimation
- elif options == 1:
- options_name = QChart.GridAxisAnimations
- elif options == 2:
- options_name = QChart.SeriesAnimations
- elif options == 3:
- options_name = QChart.AllAnimations
- chart_view.chart().setAnimationOptions(options_name)
+ chart_view.chart().setAnimationOptions(options)
# Update legend alignment
idx = self.ui.legendComboBox.currentIndex()