@@ -1,101 +1,102 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | import QtQuick 1.0 |
|
21 | import QtQuick 1.0 | |
22 | import QtCommercial.Chart 1.0 |
|
22 | import QtCommercial.Chart 1.0 | |
23 |
|
23 | |||
24 | ChartView { |
|
24 | ChartView { | |
25 | title: "area series" |
|
25 | title: "area series" | |
26 | anchors.fill: parent |
|
26 | anchors.fill: parent | |
|
27 | animationOptions: ChartView.SeriesAnimations | |||
27 |
|
28 | |||
28 | property variant series: areaSeries |
|
29 | property variant series: areaSeries | |
29 |
|
30 | |||
30 | AreaSeries { |
|
31 | AreaSeries { | |
31 | id: areaSeries |
|
32 | id: areaSeries | |
32 | name: "area 1" |
|
33 | name: "area 1" | |
33 |
|
34 | |||
34 | upperSeries: LineSeries { |
|
35 | upperSeries: LineSeries { | |
35 | XYPoint { x: 0; y: 1 } |
|
36 | XYPoint { x: 0; y: 1 } | |
36 | XYPoint { x: 1; y: 1 } |
|
37 | XYPoint { x: 1; y: 1 } | |
37 | XYPoint { x: 2; y: 3 } |
|
38 | XYPoint { x: 2; y: 3 } | |
38 | XYPoint { x: 3; y: 3 } |
|
39 | XYPoint { x: 3; y: 3 } | |
39 | XYPoint { x: 4; y: 2 } |
|
40 | XYPoint { x: 4; y: 2 } | |
40 | XYPoint { x: 5; y: 0 } |
|
41 | XYPoint { x: 5; y: 0 } | |
41 | XYPoint { x: 6; y: 2 } |
|
42 | XYPoint { x: 6; y: 2 } | |
42 | XYPoint { x: 7; y: 1 } |
|
43 | XYPoint { x: 7; y: 1 } | |
43 | XYPoint { x: 8; y: 2 } |
|
44 | XYPoint { x: 8; y: 2 } | |
44 | XYPoint { x: 9; y: 1 } |
|
45 | XYPoint { x: 9; y: 1 } | |
45 | XYPoint { x: 10; y: 3 } |
|
46 | XYPoint { x: 10; y: 3 } | |
46 | XYPoint { x: 11; y: 3 } |
|
47 | XYPoint { x: 11; y: 3 } | |
47 | } |
|
48 | } | |
48 | lowerSeries: LineSeries { |
|
49 | lowerSeries: LineSeries { | |
49 | XYPoint { x: 0; y: 0 } |
|
50 | XYPoint { x: 0; y: 0 } | |
50 | XYPoint { x: 1; y: 0 } |
|
51 | XYPoint { x: 1; y: 0 } | |
51 | XYPoint { x: 2; y: 0 } |
|
52 | XYPoint { x: 2; y: 0 } | |
52 | XYPoint { x: 3; y: 0 } |
|
53 | XYPoint { x: 3; y: 0 } | |
53 | XYPoint { x: 4; y: 0 } |
|
54 | XYPoint { x: 4; y: 0 } | |
54 | XYPoint { x: 5; y: 0 } |
|
55 | XYPoint { x: 5; y: 0 } | |
55 | XYPoint { x: 6; y: 0 } |
|
56 | XYPoint { x: 6; y: 0 } | |
56 | XYPoint { x: 7; y: 0 } |
|
57 | XYPoint { x: 7; y: 0 } | |
57 | XYPoint { x: 8; y: 0 } |
|
58 | XYPoint { x: 8; y: 0 } | |
58 | XYPoint { x: 9; y: 0 } |
|
59 | XYPoint { x: 9; y: 0 } | |
59 | XYPoint { x: 10; y: 0 } |
|
60 | XYPoint { x: 10; y: 0 } | |
60 | XYPoint { x: 11; y: 0 } |
|
61 | XYPoint { x: 11; y: 0 } | |
61 | } |
|
62 | } | |
62 |
|
63 | |||
63 | onNameChanged: console.log(name + ".onNameChanged: " + name); |
|
64 | onNameChanged: console.log(name + ".onNameChanged: " + name); | |
64 | onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible); |
|
65 | onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible); | |
65 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
66 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); | |
66 | onSelected: console.log(name + ".onSelected"); |
|
67 | onSelected: console.log(name + ".onSelected"); | |
67 | onColorChanged: console.log(name + ".onColorChanged: " + color); |
|
68 | onColorChanged: console.log(name + ".onColorChanged: " + color); | |
68 | onBorderColorChanged: console.log(name + ".onBorderColorChanged: " + borderColor); |
|
69 | onBorderColorChanged: console.log(name + ".onBorderColorChanged: " + borderColor); | |
69 | // onCountChanged: console.log(name + ".onCountChanged: " + count); |
|
70 | // onCountChanged: console.log(name + ".onCountChanged: " + count); | |
70 |
|
71 | |||
71 | Component.onCompleted: { |
|
72 | Component.onCompleted: { | |
72 | createDefaultAxes(); |
|
73 | createDefaultAxes(); | |
73 | } |
|
74 | } | |
74 | } |
|
75 | } | |
75 |
|
76 | |||
76 | AreaSeries { |
|
77 | AreaSeries { | |
77 | name: "area 2" |
|
78 | name: "area 2" | |
78 |
|
79 | |||
79 | upperSeries: LineSeries { |
|
80 | upperSeries: LineSeries { | |
80 | XYPoint { x: 0; y: 0.5 } |
|
81 | XYPoint { x: 0; y: 0.5 } | |
81 | XYPoint { x: 1; y: 1.5 } |
|
82 | XYPoint { x: 1; y: 1.5 } | |
82 | XYPoint { x: 2; y: 0.3 } |
|
83 | XYPoint { x: 2; y: 0.3 } | |
83 | XYPoint { x: 3; y: 1.5 } |
|
84 | XYPoint { x: 3; y: 1.5 } | |
84 | XYPoint { x: 4; y: 0.1 } |
|
85 | XYPoint { x: 4; y: 0.1 } | |
85 | XYPoint { x: 5; y: 0.3 } |
|
86 | XYPoint { x: 5; y: 0.3 } | |
86 | XYPoint { x: 6; y: 1.2 } |
|
87 | XYPoint { x: 6; y: 1.2 } | |
87 | XYPoint { x: 7; y: 1.3 } |
|
88 | XYPoint { x: 7; y: 1.3 } | |
88 | XYPoint { x: 8; y: 0.2 } |
|
89 | XYPoint { x: 8; y: 0.2 } | |
89 | XYPoint { x: 9; y: 0.1 } |
|
90 | XYPoint { x: 9; y: 0.1 } | |
90 | XYPoint { x: 10; y: 3.2 } |
|
91 | XYPoint { x: 10; y: 3.2 } | |
91 | XYPoint { x: 11; y: 4.6 } |
|
92 | XYPoint { x: 11; y: 4.6 } | |
92 | } |
|
93 | } | |
93 |
|
94 | |||
94 | onNameChanged: console.log(name + ".onNameChanged: " + name); |
|
95 | onNameChanged: console.log(name + ".onNameChanged: " + name); | |
95 | onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible); |
|
96 | onVisibleChanged: console.log(name + ".onVisibleChanged: " + visible); | |
96 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
97 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); | |
97 | onSelected: console.log(name + ".onSelected"); |
|
98 | onSelected: console.log(name + ".onSelected"); | |
98 | onColorChanged: console.log(name + ".onColorChanged: " + color); |
|
99 | onColorChanged: console.log(name + ".onColorChanged: " + color); | |
99 | onBorderColorChanged: console.log(name + ".onBorderColorChanged: " + borderColor); |
|
100 | onBorderColorChanged: console.log(name + ".onBorderColorChanged: " + borderColor); | |
100 | } |
|
101 | } | |
101 | } |
|
102 | } |
@@ -1,72 +1,73 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | import QtQuick 1.0 |
|
21 | import QtQuick 1.0 | |
22 | import QtCommercial.Chart 1.0 |
|
22 | import QtCommercial.Chart 1.0 | |
23 |
|
23 | |||
24 | ChartView { |
|
24 | ChartView { | |
25 | title: "Bar series" |
|
25 | title: "Bar series" | |
26 | anchors.fill: parent |
|
26 | anchors.fill: parent | |
27 | theme: ChartView.ChartThemeLight |
|
27 | theme: ChartView.ChartThemeLight | |
28 | legend.alignment: Qt.AlignBottom |
|
28 | legend.alignment: Qt.AlignBottom | |
|
29 | animationOptions: ChartView.SeriesAnimations | |||
29 |
|
30 | |||
30 | property variant series: mySeries |
|
31 | property variant series: mySeries | |
31 |
|
32 | |||
32 | BarCategoriesAxis { |
|
33 | BarCategoriesAxis { | |
33 | id:myAxis; |
|
34 | id:myAxis; | |
34 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } |
|
35 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } | |
35 |
|
36 | |||
36 | BarSeries { |
|
37 | BarSeries { | |
37 | id: mySeries |
|
38 | id: mySeries | |
38 | name: "bar" |
|
39 | name: "bar" | |
39 |
|
40 | |||
40 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] |
|
41 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] | |
41 | onClicked: console.log("barset.onClicked: " + index); |
|
42 | onClicked: console.log("barset.onClicked: " + index); | |
42 | onHovered: console.log("barset.onHovered: " + status); |
|
43 | onHovered: console.log("barset.onHovered: " + status); | |
43 | onPenChanged: console.log("barset.onPenChanged: " + pen); |
|
44 | onPenChanged: console.log("barset.onPenChanged: " + pen); | |
44 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); |
|
45 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); | |
45 | onLabelChanged: console.log("barset.onLabelChanged: " + label); |
|
46 | onLabelChanged: console.log("barset.onLabelChanged: " + label); | |
46 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); |
|
47 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); | |
47 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); |
|
48 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); | |
48 | onColorChanged: console.log("barset.onColorChanged: " + color); |
|
49 | onColorChanged: console.log("barset.onColorChanged: " + color); | |
49 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); |
|
50 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); | |
50 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); |
|
51 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); | |
51 | onCountChanged: console.log("barset.onCountChanged: " + count); |
|
52 | onCountChanged: console.log("barset.onCountChanged: " + count); | |
52 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); |
|
53 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); | |
53 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); |
|
54 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); | |
54 | onValueChanged: console.log("barset.onValuesChanged: " + index); |
|
55 | onValueChanged: console.log("barset.onValuesChanged: " + index); | |
55 | } |
|
56 | } | |
56 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } |
|
57 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } | |
57 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } |
|
58 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } | |
58 |
|
59 | |||
59 | onNameChanged: console.log("groupedBarSeries.onNameChanged: " + series.name); |
|
60 | onNameChanged: console.log("groupedBarSeries.onNameChanged: " + series.name); | |
60 | onVisibleChanged: console.log("groupedBarSeries.onVisibleChanged: " + series.visible); |
|
61 | onVisibleChanged: console.log("groupedBarSeries.onVisibleChanged: " + series.visible); | |
61 | onClicked: console.log("groupedBarSeries.onClicked: " + barset + " " + index); |
|
62 | onClicked: console.log("groupedBarSeries.onClicked: " + barset + " " + index); | |
62 | onHovered: console.log("groupedBarSeries.onHovered: " + barset + " " + status); |
|
63 | onHovered: console.log("groupedBarSeries.onHovered: " + barset + " " + status); | |
63 | onLabelsVisibleChanged: console.log("groupedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); |
|
64 | onLabelsVisibleChanged: console.log("groupedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); | |
64 | onCountChanged: console.log("groupedBarSeries.onCountChanged: " + count); |
|
65 | onCountChanged: console.log("groupedBarSeries.onCountChanged: " + count); | |
65 | } |
|
66 | } | |
66 |
|
67 | |||
67 | Component.onCompleted: { |
|
68 | Component.onCompleted: { | |
68 | createDefaultAxes(); |
|
69 | createDefaultAxes(); | |
69 | setAxisX(myAxis,mySeries); |
|
70 | setAxisX(myAxis,mySeries); | |
70 | } |
|
71 | } | |
71 |
|
72 | |||
72 | } |
|
73 | } |
@@ -1,65 +1,66 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | import QtQuick 1.0 |
|
21 | import QtQuick 1.0 | |
22 | import QtCommercial.Chart 1.0 |
|
22 | import QtCommercial.Chart 1.0 | |
23 |
|
23 | |||
24 | ChartView { |
|
24 | ChartView { | |
25 | property variant series: lineSeries |
|
25 | property variant series: lineSeries | |
26 |
|
26 | |||
27 | title: "line series" |
|
27 | title: "line series" | |
28 | anchors.fill: parent |
|
28 | anchors.fill: parent | |
|
29 | animationOptions: ChartView.SeriesAnimations | |||
29 |
|
30 | |||
30 | LineSeries { |
|
31 | LineSeries { | |
31 | id: lineSeries |
|
32 | id: lineSeries | |
32 | name: "line 1" |
|
33 | name: "line 1" | |
33 | XYPoint { x: 0; y: 0 } |
|
34 | XYPoint { x: 0; y: 0 } | |
34 | XYPoint { x: 1.1; y: 2.1 } |
|
35 | XYPoint { x: 1.1; y: 2.1 } | |
35 | XYPoint { x: 1.9; y: 3.3 } |
|
36 | XYPoint { x: 1.9; y: 3.3 } | |
36 | XYPoint { x: 2.1; y: 2.1 } |
|
37 | XYPoint { x: 2.1; y: 2.1 } | |
37 | XYPoint { x: 2.9; y: 4.9 } |
|
38 | XYPoint { x: 2.9; y: 4.9 } | |
38 | XYPoint { x: 3.4; y: 3.0 } |
|
39 | XYPoint { x: 3.4; y: 3.0 } | |
39 | XYPoint { x: 4.1; y: 3.3 } |
|
40 | XYPoint { x: 4.1; y: 3.3 } | |
40 |
|
41 | |||
41 | onNameChanged: console.log("lineSeries.onNameChanged: " + name); |
|
42 | onNameChanged: console.log("lineSeries.onNameChanged: " + name); | |
42 | onVisibleChanged: console.log("lineSeries.onVisibleChanged: " + visible); |
|
43 | onVisibleChanged: console.log("lineSeries.onVisibleChanged: " + visible); | |
43 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
44 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); | |
44 | onPointReplaced: console.log("lineSeries.onPointReplaced: " + index); |
|
45 | onPointReplaced: console.log("lineSeries.onPointReplaced: " + index); | |
45 | onPointRemoved: console.log("lineSeries.onPointRemoved: " + index); |
|
46 | onPointRemoved: console.log("lineSeries.onPointRemoved: " + index); | |
46 | onPointAdded: console.log("lineSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); |
|
47 | onPointAdded: console.log("lineSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); | |
47 | onColorChanged: console.log("lineSeries.onColorChanged: " + color); |
|
48 | onColorChanged: console.log("lineSeries.onColorChanged: " + color); | |
48 | onCountChanged: console.log("lineSeries.onCountChanged: " + count); |
|
49 | onCountChanged: console.log("lineSeries.onCountChanged: " + count); | |
49 | } |
|
50 | } | |
50 |
|
51 | |||
51 | LineSeries { |
|
52 | LineSeries { | |
52 | name: "line 2" |
|
53 | name: "line 2" | |
53 | XYPoint { x: 1.1; y: 1.1 } |
|
54 | XYPoint { x: 1.1; y: 1.1 } | |
54 | XYPoint { x: 1.9; y: 2.3 } |
|
55 | XYPoint { x: 1.9; y: 2.3 } | |
55 | XYPoint { x: 2.1; y: 1.1 } |
|
56 | XYPoint { x: 2.1; y: 1.1 } | |
56 | XYPoint { x: 2.9; y: 3.9 } |
|
57 | XYPoint { x: 2.9; y: 3.9 } | |
57 | XYPoint { x: 3.4; y: 2.0 } |
|
58 | XYPoint { x: 3.4; y: 2.0 } | |
58 | XYPoint { x: 4.1; y: 2.3 } |
|
59 | XYPoint { x: 4.1; y: 2.3 } | |
59 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
60 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); | |
60 | } |
|
61 | } | |
61 |
|
62 | |||
62 | Component.onCompleted: { |
|
63 | Component.onCompleted: { | |
63 | createDefaultAxes(); |
|
64 | createDefaultAxes(); | |
64 | } |
|
65 | } | |
65 | } |
|
66 | } |
@@ -1,71 +1,72 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | import QtQuick 1.0 |
|
21 | import QtQuick 1.0 | |
22 | import QtCommercial.Chart 1.0 |
|
22 | import QtCommercial.Chart 1.0 | |
23 |
|
23 | |||
24 | ChartView { |
|
24 | ChartView { | |
25 | title: "Percent bar series" |
|
25 | title: "Percent bar series" | |
26 | anchors.fill: parent |
|
26 | anchors.fill: parent | |
27 | theme: ChartView.ChartThemeLight |
|
27 | theme: ChartView.ChartThemeLight | |
28 | legend.alignment: Qt.AlignBottom |
|
28 | legend.alignment: Qt.AlignBottom | |
|
29 | animationOptions: ChartView.SeriesAnimations | |||
29 |
|
30 | |||
30 | property variant series: mySeries |
|
31 | property variant series: mySeries | |
31 |
|
32 | |||
32 | BarCategoriesAxis { |
|
33 | BarCategoriesAxis { | |
33 | id: myAxis |
|
34 | id: myAxis | |
34 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] |
|
35 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] | |
35 | } |
|
36 | } | |
36 |
|
37 | |||
37 | PercentBarSeries { |
|
38 | PercentBarSeries { | |
38 | id: mySeries |
|
39 | id: mySeries | |
39 | name: "bar" |
|
40 | name: "bar" | |
40 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] |
|
41 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] | |
41 | onClicked: console.log("barset.onClicked: " + index); |
|
42 | onClicked: console.log("barset.onClicked: " + index); | |
42 | onHovered: console.log("barset.onHovered: " + status); |
|
43 | onHovered: console.log("barset.onHovered: " + status); | |
43 | onPenChanged: console.log("barset.onPenChanged: " + pen); |
|
44 | onPenChanged: console.log("barset.onPenChanged: " + pen); | |
44 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); |
|
45 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); | |
45 | onLabelChanged: console.log("barset.onLabelChanged: " + label); |
|
46 | onLabelChanged: console.log("barset.onLabelChanged: " + label); | |
46 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); |
|
47 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); | |
47 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); |
|
48 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); | |
48 | onColorChanged: console.log("barset.onColorChanged: " + color); |
|
49 | onColorChanged: console.log("barset.onColorChanged: " + color); | |
49 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); |
|
50 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); | |
50 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); |
|
51 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); | |
51 | onCountChanged: console.log("barset.onCountChanged: " + count); |
|
52 | onCountChanged: console.log("barset.onCountChanged: " + count); | |
52 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); |
|
53 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); | |
53 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); |
|
54 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); | |
54 | onValueChanged: console.log("barset.onValuesChanged: " + index); |
|
55 | onValueChanged: console.log("barset.onValuesChanged: " + index); | |
55 | } |
|
56 | } | |
56 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } |
|
57 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } | |
57 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } |
|
58 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } | |
58 |
|
59 | |||
59 | onNameChanged: console.log("percentBarSeries.onNameChanged: " + series.name); |
|
60 | onNameChanged: console.log("percentBarSeries.onNameChanged: " + series.name); | |
60 | onVisibleChanged: console.log("percentBarSeries.onVisibleChanged: " + series.visible); |
|
61 | onVisibleChanged: console.log("percentBarSeries.onVisibleChanged: " + series.visible); | |
61 | onClicked: console.log("percentBarSeries.onClicked: " + barset + " " + index); |
|
62 | onClicked: console.log("percentBarSeries.onClicked: " + barset + " " + index); | |
62 | onHovered: console.log("percentBarSeries.onHovered: " + barset + " " + status); |
|
63 | onHovered: console.log("percentBarSeries.onHovered: " + barset + " " + status); | |
63 | onLabelsVisibleChanged: console.log("percentBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); |
|
64 | onLabelsVisibleChanged: console.log("percentBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); | |
64 | onCountChanged: console.log("percentBarSeries.onCountChanged: " + count); |
|
65 | onCountChanged: console.log("percentBarSeries.onCountChanged: " + count); | |
65 | } |
|
66 | } | |
66 |
|
67 | |||
67 | Component.onCompleted: { |
|
68 | Component.onCompleted: { | |
68 | createDefaultAxes(); |
|
69 | createDefaultAxes(); | |
69 | setAxisX(myAxis,mySeries); |
|
70 | setAxisX(myAxis,mySeries); | |
70 | } |
|
71 | } | |
71 | } |
|
72 | } |
@@ -1,64 +1,65 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | import QtQuick 1.0 |
|
21 | import QtQuick 1.0 | |
22 | import QtCommercial.Chart 1.0 |
|
22 | import QtCommercial.Chart 1.0 | |
23 |
|
23 | |||
24 | ChartView { |
|
24 | ChartView { | |
25 | title: "scatter series" |
|
25 | title: "scatter series" | |
26 | property variant series: scatterSeries |
|
26 | property variant series: scatterSeries | |
|
27 | animationOptions: ChartView.SeriesAnimations | |||
27 |
|
28 | |||
28 | ScatterSeries { |
|
29 | ScatterSeries { | |
29 | id: scatterSeries |
|
30 | id: scatterSeries | |
30 | name: "scatter 1" |
|
31 | name: "scatter 1" | |
31 | XYPoint { x: 1.5; y: 1.5 } |
|
32 | XYPoint { x: 1.5; y: 1.5 } | |
32 | XYPoint { x: 1.5; y: 1.6 } |
|
33 | XYPoint { x: 1.5; y: 1.6 } | |
33 | XYPoint { x: 1.57; y: 1.55 } |
|
34 | XYPoint { x: 1.57; y: 1.55 } | |
34 | XYPoint { x: 1.8; y: 1.8 } |
|
35 | XYPoint { x: 1.8; y: 1.8 } | |
35 | XYPoint { x: 1.9; y: 1.6 } |
|
36 | XYPoint { x: 1.9; y: 1.6 } | |
36 | XYPoint { x: 2.1; y: 1.3 } |
|
37 | XYPoint { x: 2.1; y: 1.3 } | |
37 | XYPoint { x: 2.5; y: 2.1 } |
|
38 | XYPoint { x: 2.5; y: 2.1 } | |
38 |
|
39 | |||
39 | onNameChanged: console.log("scatterSeries.onNameChanged: " + name); |
|
40 | onNameChanged: console.log("scatterSeries.onNameChanged: " + name); | |
40 | onVisibleChanged: console.log("scatterSeries.onVisibleChanged: " + visible); |
|
41 | onVisibleChanged: console.log("scatterSeries.onVisibleChanged: " + visible); | |
41 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
42 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); | |
42 | onPointReplaced: console.log("scatterSeries.onPointReplaced: " + index); |
|
43 | onPointReplaced: console.log("scatterSeries.onPointReplaced: " + index); | |
43 | onPointRemoved: console.log("scatterSeries.onPointRemoved: " + index); |
|
44 | onPointRemoved: console.log("scatterSeries.onPointRemoved: " + index); | |
44 | onPointAdded: console.log("scatterSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); |
|
45 | onPointAdded: console.log("scatterSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); | |
45 | onColorChanged: console.log("scatterSeries.onColorChanged: " + color); |
|
46 | onColorChanged: console.log("scatterSeries.onColorChanged: " + color); | |
46 | onBorderColorChanged: console.log("scatterSeries.onBorderColorChanged: " + borderColor); |
|
47 | onBorderColorChanged: console.log("scatterSeries.onBorderColorChanged: " + borderColor); | |
47 | onCountChanged: console.log("scatterSeries.onCountChanged: " + count); |
|
48 | onCountChanged: console.log("scatterSeries.onCountChanged: " + count); | |
48 | } |
|
49 | } | |
49 |
|
50 | |||
50 | ScatterSeries { |
|
51 | ScatterSeries { | |
51 | name: "scatter2" |
|
52 | name: "scatter2" | |
52 | XYPoint { x: 2.0; y: 2.0 } |
|
53 | XYPoint { x: 2.0; y: 2.0 } | |
53 | XYPoint { x: 2.0; y: 2.1 } |
|
54 | XYPoint { x: 2.0; y: 2.1 } | |
54 | XYPoint { x: 2.07; y: 2.05 } |
|
55 | XYPoint { x: 2.07; y: 2.05 } | |
55 | XYPoint { x: 2.2; y: 2.9 } |
|
56 | XYPoint { x: 2.2; y: 2.9 } | |
56 | XYPoint { x: 2.4; y: 2.7 } |
|
57 | XYPoint { x: 2.4; y: 2.7 } | |
57 | XYPoint { x: 2.67; y: 2.65 } |
|
58 | XYPoint { x: 2.67; y: 2.65 } | |
58 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
59 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); | |
59 | } |
|
60 | } | |
60 |
|
61 | |||
61 | Component.onCompleted: { |
|
62 | Component.onCompleted: { | |
62 | createDefaultAxes(); |
|
63 | createDefaultAxes(); | |
63 | } |
|
64 | } | |
64 | } |
|
65 | } |
@@ -1,64 +1,65 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | import QtQuick 1.0 |
|
21 | import QtQuick 1.0 | |
22 | import QtCommercial.Chart 1.0 |
|
22 | import QtCommercial.Chart 1.0 | |
23 |
|
23 | |||
24 | ChartView { |
|
24 | ChartView { | |
25 | title: "spline series" |
|
25 | title: "spline series" | |
26 | anchors.fill: parent |
|
26 | anchors.fill: parent | |
27 | property variant series: splineSeries |
|
27 | property variant series: splineSeries | |
|
28 | animationOptions: ChartView.SeriesAnimations | |||
28 |
|
29 | |||
29 | SplineSeries { |
|
30 | SplineSeries { | |
30 | id: splineSeries |
|
31 | id: splineSeries | |
31 | name: "spline 1" |
|
32 | name: "spline 1" | |
32 | XYPoint { x: 0; y: 0 } |
|
33 | XYPoint { x: 0; y: 0 } | |
33 | XYPoint { x: 1.1; y: 2.1 } |
|
34 | XYPoint { x: 1.1; y: 2.1 } | |
34 | XYPoint { x: 1.9; y: 3.3 } |
|
35 | XYPoint { x: 1.9; y: 3.3 } | |
35 | XYPoint { x: 2.1; y: 2.1 } |
|
36 | XYPoint { x: 2.1; y: 2.1 } | |
36 | XYPoint { x: 2.9; y: 4.9 } |
|
37 | XYPoint { x: 2.9; y: 4.9 } | |
37 | XYPoint { x: 3.4; y: 3.0 } |
|
38 | XYPoint { x: 3.4; y: 3.0 } | |
38 | XYPoint { x: 4.1; y: 3.3 } |
|
39 | XYPoint { x: 4.1; y: 3.3 } | |
39 |
|
40 | |||
40 | onNameChanged: console.log("splineSeries.onNameChanged: " + name); |
|
41 | onNameChanged: console.log("splineSeries.onNameChanged: " + name); | |
41 | onVisibleChanged: console.log("splineSeries.onVisibleChanged: " + visible); |
|
42 | onVisibleChanged: console.log("splineSeries.onVisibleChanged: " + visible); | |
42 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
43 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); | |
43 | onPointReplaced: console.log("splineSeries.onPointReplaced: " + index); |
|
44 | onPointReplaced: console.log("splineSeries.onPointReplaced: " + index); | |
44 | onPointRemoved: console.log("splineSeries.onPointRemoved: " + index); |
|
45 | onPointRemoved: console.log("splineSeries.onPointRemoved: " + index); | |
45 | onPointAdded: console.log("splineSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); |
|
46 | onPointAdded: console.log("splineSeries.onPointAdded: " + series.at(index).x + ", " + series.at(index).y); | |
46 | onColorChanged: console.log("splineSeries.onColorChanged: " + color); |
|
47 | onColorChanged: console.log("splineSeries.onColorChanged: " + color); | |
47 | onCountChanged: console.log("splineSeries.onCountChanged: " + count); |
|
48 | onCountChanged: console.log("splineSeries.onCountChanged: " + count); | |
48 | } |
|
49 | } | |
49 |
|
50 | |||
50 | SplineSeries { |
|
51 | SplineSeries { | |
51 | name: "spline 2" |
|
52 | name: "spline 2" | |
52 | XYPoint { x: 1.1; y: 1.1 } |
|
53 | XYPoint { x: 1.1; y: 1.1 } | |
53 | XYPoint { x: 1.9; y: 2.3 } |
|
54 | XYPoint { x: 1.9; y: 2.3 } | |
54 | XYPoint { x: 2.1; y: 1.1 } |
|
55 | XYPoint { x: 2.1; y: 1.1 } | |
55 | XYPoint { x: 2.9; y: 3.9 } |
|
56 | XYPoint { x: 2.9; y: 3.9 } | |
56 | XYPoint { x: 3.4; y: 2.0 } |
|
57 | XYPoint { x: 3.4; y: 2.0 } | |
57 | XYPoint { x: 4.1; y: 2.3 } |
|
58 | XYPoint { x: 4.1; y: 2.3 } | |
58 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
59 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); | |
59 | } |
|
60 | } | |
60 |
|
61 | |||
61 | Component.onCompleted: { |
|
62 | Component.onCompleted: { | |
62 | createDefaultAxes(); |
|
63 | createDefaultAxes(); | |
63 | } |
|
64 | } | |
64 | } |
|
65 | } |
@@ -1,71 +1,72 | |||||
1 | /**************************************************************************** |
|
1 | /**************************************************************************** | |
2 | ** |
|
2 | ** | |
3 | ** Copyright (C) 2012 Digia Plc |
|
3 | ** Copyright (C) 2012 Digia Plc | |
4 | ** All rights reserved. |
|
4 | ** All rights reserved. | |
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
5 | ** For any questions to Digia, please use contact form at http://qt.digia.com | |
6 | ** |
|
6 | ** | |
7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
7 | ** This file is part of the Qt Commercial Charts Add-on. | |
8 | ** |
|
8 | ** | |
9 | ** $QT_BEGIN_LICENSE$ |
|
9 | ** $QT_BEGIN_LICENSE$ | |
10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in | |
11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
11 | ** accordance with the Qt Commercial License Agreement provided with the | |
12 | ** Software or, alternatively, in accordance with the terms contained in |
|
12 | ** Software or, alternatively, in accordance with the terms contained in | |
13 | ** a written agreement between you and Digia. |
|
13 | ** a written agreement between you and Digia. | |
14 | ** |
|
14 | ** | |
15 | ** If you have questions regarding the use of this file, please use |
|
15 | ** If you have questions regarding the use of this file, please use | |
16 | ** contact form at http://qt.digia.com |
|
16 | ** contact form at http://qt.digia.com | |
17 | ** $QT_END_LICENSE$ |
|
17 | ** $QT_END_LICENSE$ | |
18 | ** |
|
18 | ** | |
19 | ****************************************************************************/ |
|
19 | ****************************************************************************/ | |
20 |
|
20 | |||
21 | import QtQuick 1.0 |
|
21 | import QtQuick 1.0 | |
22 | import QtCommercial.Chart 1.0 |
|
22 | import QtCommercial.Chart 1.0 | |
23 |
|
23 | |||
24 | ChartView { |
|
24 | ChartView { | |
25 | title: "Stacked bar series" |
|
25 | title: "Stacked bar series" | |
26 | anchors.fill: parent |
|
26 | anchors.fill: parent | |
27 | theme: ChartView.ChartThemeLight |
|
27 | theme: ChartView.ChartThemeLight | |
28 | legend.alignment: Qt.AlignBottom |
|
28 | legend.alignment: Qt.AlignBottom | |
|
29 | animationOptions: ChartView.SeriesAnimations | |||
29 |
|
30 | |||
30 | property variant series: mySeries |
|
31 | property variant series: mySeries | |
31 |
|
32 | |||
32 | BarCategoriesAxis { |
|
33 | BarCategoriesAxis { | |
33 | id: myAxis |
|
34 | id: myAxis | |
34 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] |
|
35 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] | |
35 | } |
|
36 | } | |
36 |
|
37 | |||
37 | StackedBarSeries { |
|
38 | StackedBarSeries { | |
38 | id: mySeries |
|
39 | id: mySeries | |
39 | name: "bar" |
|
40 | name: "bar" | |
40 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] |
|
41 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] | |
41 | onClicked: console.log("barset.onClicked: " + index); |
|
42 | onClicked: console.log("barset.onClicked: " + index); | |
42 | onHovered: console.log("barset.onHovered: " + status); |
|
43 | onHovered: console.log("barset.onHovered: " + status); | |
43 | onPenChanged: console.log("barset.onPenChanged: " + pen); |
|
44 | onPenChanged: console.log("barset.onPenChanged: " + pen); | |
44 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); |
|
45 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); | |
45 | onLabelChanged: console.log("barset.onLabelChanged: " + label); |
|
46 | onLabelChanged: console.log("barset.onLabelChanged: " + label); | |
46 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); |
|
47 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); | |
47 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); |
|
48 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); | |
48 | onColorChanged: console.log("barset.onColorChanged: " + color); |
|
49 | onColorChanged: console.log("barset.onColorChanged: " + color); | |
49 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); |
|
50 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); | |
50 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); |
|
51 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); | |
51 | onCountChanged: console.log("barset.onCountChanged: " + count); |
|
52 | onCountChanged: console.log("barset.onCountChanged: " + count); | |
52 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); |
|
53 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); | |
53 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); |
|
54 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); | |
54 | onValueChanged: console.log("barset.onValuesChanged: " + index); |
|
55 | onValueChanged: console.log("barset.onValuesChanged: " + index); | |
55 | } |
|
56 | } | |
56 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } |
|
57 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } | |
57 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } |
|
58 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } | |
58 |
|
59 | |||
59 | onNameChanged: console.log("stackedBarSeries.onNameChanged: " + series.name); |
|
60 | onNameChanged: console.log("stackedBarSeries.onNameChanged: " + series.name); | |
60 | onVisibleChanged: console.log("stackedBarSeries.onVisibleChanged: " + series.visible); |
|
61 | onVisibleChanged: console.log("stackedBarSeries.onVisibleChanged: " + series.visible); | |
61 | onClicked: console.log("stackedBarSeries.onClicked: " + barset + " " + index); |
|
62 | onClicked: console.log("stackedBarSeries.onClicked: " + barset + " " + index); | |
62 | onHovered: console.log("stackedBarSeries.onHovered: " + barset + " " + status); |
|
63 | onHovered: console.log("stackedBarSeries.onHovered: " + barset + " " + status); | |
63 | onLabelsVisibleChanged: console.log("stackedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); |
|
64 | onLabelsVisibleChanged: console.log("stackedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); | |
64 | onCountChanged: console.log("stackedBarSeries.onCountChanged: " + count); |
|
65 | onCountChanged: console.log("stackedBarSeries.onCountChanged: " + count); | |
65 | } |
|
66 | } | |
66 |
|
67 | |||
67 | Component.onCompleted: { |
|
68 | Component.onCompleted: { | |
68 | createDefaultAxes(); |
|
69 | createDefaultAxes(); | |
69 | setAxisX(myAxis,mySeries); |
|
70 | setAxisX(myAxis,mySeries); | |
70 | } |
|
71 | } | |
71 | } |
|
72 | } |
General Comments 0
You need to be logged in to leave comments.
Login now