Debian Codegraph @

examples/charts/qmlchartsgallery/qml/customlegend/ChartViewStacked.qml

raw
1 // Copyright (C) 2023 The Qt Company Ltd.
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4 import QtQuick
5 import QtCharts
6
7 ChartView {
8 id: chartView
9
10 signal entered(string seriesName)
11 signal exited(string seriesName)
12
13 title: "Government Taxes"
14 legend.visible: false
15 margins.top: 10
16 margins.bottom: 0
17 antialiasing: true
18
19 ValueAxis {
20 id: axisX
21 min: 2006
22 max: 2012
23 tickCount: 7
24 labelFormat: "%.0f"
25 }
26
27 ValueAxis {
28 id: axisY
29 titleText: "EUR"
30 min: 0
31 max: 90000
32 tickCount: 10
33 labelFormat: "%.0f"
34 }
35
36 AnimatedAreaSeries {
37 id: stateSeries
38 name: "state"
39 axisX: axisX
40 axisY: axisY
41 borderWidth: 0
42 upperSeries: LineSeries {
43 id: stateUpper
44 XYPoint { x: 2006; y: 33119 }
45 XYPoint { x: 2007; y: 37941 }
46 XYPoint { x: 2008; y: 40122 }
47 XYPoint { x: 2009; y: 38991 }
48 XYPoint { x: 2010; y: 34055 }
49 XYPoint { x: 2011; y: 34555 }
50 XYPoint { x: 2012; y: 38991 }
51 }
52 lowerSeries: LineSeries {
53 XYPoint { x: 2006; y: 0 }
54 XYPoint { x: 2007; y: 0 }
55 XYPoint { x: 2008; y: 0 }
56 XYPoint { x: 2009; y: 0 }
57 XYPoint { x: 2010; y: 0 }
58 XYPoint { x: 2011; y: 0 }
59 XYPoint { x: 2012; y: 0 }
60 }
61 }
62
63 //![1]
64 AnimatedAreaSeries {
65 id: municipalSeries
66 name: "municipal"
67 axisX: axisX
68 axisY: axisY
69 borderWidth: 0
70 upperSeries: LineSeries {
71 id: municipalUpper
72 XYPoint { x: 2006; y: 33119 + 13443 }
73 XYPoint { x: 2007; y: 37941 + 15311 }
74 XYPoint { x: 2008; y: 40122 + 16552 }
75 XYPoint { x: 2009; y: 38991 + 17904 }
76 XYPoint { x: 2010; y: 34055 + 17599 }
77 XYPoint { x: 2011; y: 34555 + 19002 }
78 XYPoint { x: 2012; y: 38991 + 19177 }
79 }
80 lowerSeries: stateUpper
81 }
82 //![1]
83
84 AnimatedAreaSeries {
85 id: socialSeries
86 name: "social sec."
87 axisX: axisX
88 axisY: axisY
89 borderWidth: 0
90 upperSeries: LineSeries {
91 id: socialUpper
92 XYPoint { x: 2006; y: 33119 + 13443 + 18855 }
93 XYPoint { x: 2007; y: 37941 + 15311 + 20238 }
94 XYPoint { x: 2008; y: 40122 + 16552 + 21347 }
95 XYPoint { x: 2009; y: 38991 + 17904 + 22376 }
96 XYPoint { x: 2010; y: 34055 + 17599 + 22076 }
97 XYPoint { x: 2011; y: 34555 + 19002 + 22631 }
98 XYPoint { x: 2012; y: 38991 + 19177 + 23686 }
99 }
100 lowerSeries: municipalUpper
101 }
102 }