@@ -1,64 +1,63 | |||
|
1 | 1 | /**************************************************************************** |
|
2 | 2 | ** |
|
3 | 3 | ** Copyright (C) 2012 Digia Plc |
|
4 | 4 | ** All rights reserved. |
|
5 | 5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
6 | 6 | ** |
|
7 | 7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
8 | 8 | ** |
|
9 | 9 | ** $QT_BEGIN_LICENSE$ |
|
10 | 10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
11 | 11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
12 | 12 | ** Software or, alternatively, in accordance with the terms contained in |
|
13 | 13 | ** a written agreement between you and Digia. |
|
14 | 14 | ** |
|
15 | 15 | ** If you have questions regarding the use of this file, please use |
|
16 | 16 | ** contact form at http://qt.digia.com |
|
17 | 17 | ** $QT_END_LICENSE$ |
|
18 | 18 | ** |
|
19 | 19 | ****************************************************************************/ |
|
20 | 20 | |
|
21 | 21 | import QtQuick 1.0 |
|
22 | 22 | import QtCommercial.Chart 1.1 |
|
23 | 23 | |
|
24 | 24 | ChartView { |
|
25 | 25 | title: "Bar series" |
|
26 | 26 | anchors.fill: parent |
|
27 | 27 | theme: ChartView.ChartThemeLight |
|
28 | 28 | legend.alignment: Qt.AlignBottom |
|
29 | 29 | animationOptions: ChartView.SeriesAnimations |
|
30 | 30 | |
|
31 | 31 | property variant series: mySeries |
|
32 | 32 | |
|
33 | ||
|
34 | 33 | HorizontalBarSeries { |
|
35 | 34 | id: mySeries |
|
36 | 35 | name: "bar" |
|
37 |
axis |
|
|
36 | axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } | |
|
38 | 37 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] |
|
39 | 38 | onClicked: console.log("barset.onClicked: " + index); |
|
40 | 39 | onHovered: console.log("barset.onHovered: " + status); |
|
41 | 40 | onPenChanged: console.log("barset.onPenChanged: " + pen); |
|
42 | 41 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); |
|
43 | 42 | onLabelChanged: console.log("barset.onLabelChanged: " + label); |
|
44 | 43 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); |
|
45 | 44 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); |
|
46 | 45 | onColorChanged: console.log("barset.onColorChanged: " + color); |
|
47 | 46 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); |
|
48 | 47 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); |
|
49 | 48 | onCountChanged: console.log("barset.onCountChanged: " + count); |
|
50 | 49 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); |
|
51 | 50 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); |
|
52 | 51 | onValueChanged: console.log("barset.onValuesChanged: " + index); |
|
53 | 52 | } |
|
54 | 53 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } |
|
55 | 54 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } |
|
56 | 55 | |
|
57 | 56 | onNameChanged: console.log("groupedBarSeries.onNameChanged: " + series.name); |
|
58 | 57 | onVisibleChanged: console.log("groupedBarSeries.onVisibleChanged: " + series.visible); |
|
59 | 58 | onClicked: console.log("groupedBarSeries.onClicked: " + barset + " " + index); |
|
60 | 59 | onHovered: console.log("groupedBarSeries.onHovered: " + barset + " " + status); |
|
61 | 60 | onLabelsVisibleChanged: console.log("groupedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); |
|
62 | 61 | onCountChanged: console.log("groupedBarSeries.onCountChanged: " + count); |
|
63 | 62 | } |
|
64 | 63 | } |
@@ -1,64 +1,63 | |||
|
1 | 1 | /**************************************************************************** |
|
2 | 2 | ** |
|
3 | 3 | ** Copyright (C) 2012 Digia Plc |
|
4 | 4 | ** All rights reserved. |
|
5 | 5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
6 | 6 | ** |
|
7 | 7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
8 | 8 | ** |
|
9 | 9 | ** $QT_BEGIN_LICENSE$ |
|
10 | 10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
11 | 11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
12 | 12 | ** Software or, alternatively, in accordance with the terms contained in |
|
13 | 13 | ** a written agreement between you and Digia. |
|
14 | 14 | ** |
|
15 | 15 | ** If you have questions regarding the use of this file, please use |
|
16 | 16 | ** contact form at http://qt.digia.com |
|
17 | 17 | ** $QT_END_LICENSE$ |
|
18 | 18 | ** |
|
19 | 19 | ****************************************************************************/ |
|
20 | 20 | |
|
21 | 21 | import QtQuick 1.0 |
|
22 | 22 | import QtCommercial.Chart 1.1 |
|
23 | 23 | |
|
24 | 24 | ChartView { |
|
25 | 25 | title: "Percent bar series" |
|
26 | 26 | anchors.fill: parent |
|
27 | 27 | theme: ChartView.ChartThemeLight |
|
28 | 28 | legend.alignment: Qt.AlignBottom |
|
29 | 29 | animationOptions: ChartView.SeriesAnimations |
|
30 | 30 | |
|
31 | 31 | property variant series: mySeries |
|
32 | 32 | |
|
33 | 33 | HorizontalPercentBarSeries { |
|
34 | 34 | id: mySeries |
|
35 | 35 | name: "bar" |
|
36 |
axis |
|
|
37 | ||
|
36 | axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } | |
|
38 | 37 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] |
|
39 | 38 | onClicked: console.log("barset.onClicked: " + index); |
|
40 | 39 | onHovered: console.log("barset.onHovered: " + status); |
|
41 | 40 | onPenChanged: console.log("barset.onPenChanged: " + pen); |
|
42 | 41 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); |
|
43 | 42 | onLabelChanged: console.log("barset.onLabelChanged: " + label); |
|
44 | 43 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); |
|
45 | 44 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); |
|
46 | 45 | onColorChanged: console.log("barset.onColorChanged: " + color); |
|
47 | 46 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); |
|
48 | 47 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); |
|
49 | 48 | onCountChanged: console.log("barset.onCountChanged: " + count); |
|
50 | 49 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); |
|
51 | 50 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); |
|
52 | 51 | onValueChanged: console.log("barset.onValuesChanged: " + index); |
|
53 | 52 | } |
|
54 | 53 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } |
|
55 | 54 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } |
|
56 | 55 | |
|
57 | 56 | onNameChanged: console.log("percentBarSeries.onNameChanged: " + series.name); |
|
58 | 57 | onVisibleChanged: console.log("percentBarSeries.onVisibleChanged: " + series.visible); |
|
59 | 58 | onClicked: console.log("percentBarSeries.onClicked: " + barset + " " + index); |
|
60 | 59 | onHovered: console.log("percentBarSeries.onHovered: " + barset + " " + status); |
|
61 | 60 | onLabelsVisibleChanged: console.log("percentBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); |
|
62 | 61 | onCountChanged: console.log("percentBarSeries.onCountChanged: " + count); |
|
63 | 62 | } |
|
64 | 63 | } |
@@ -1,63 +1,63 | |||
|
1 | 1 | /**************************************************************************** |
|
2 | 2 | ** |
|
3 | 3 | ** Copyright (C) 2012 Digia Plc |
|
4 | 4 | ** All rights reserved. |
|
5 | 5 | ** For any questions to Digia, please use contact form at http://qt.digia.com |
|
6 | 6 | ** |
|
7 | 7 | ** This file is part of the Qt Commercial Charts Add-on. |
|
8 | 8 | ** |
|
9 | 9 | ** $QT_BEGIN_LICENSE$ |
|
10 | 10 | ** Licensees holding valid Qt Commercial licenses may use this file in |
|
11 | 11 | ** accordance with the Qt Commercial License Agreement provided with the |
|
12 | 12 | ** Software or, alternatively, in accordance with the terms contained in |
|
13 | 13 | ** a written agreement between you and Digia. |
|
14 | 14 | ** |
|
15 | 15 | ** If you have questions regarding the use of this file, please use |
|
16 | 16 | ** contact form at http://qt.digia.com |
|
17 | 17 | ** $QT_END_LICENSE$ |
|
18 | 18 | ** |
|
19 | 19 | ****************************************************************************/ |
|
20 | 20 | |
|
21 | 21 | import QtQuick 1.0 |
|
22 | 22 | import QtCommercial.Chart 1.1 |
|
23 | 23 | |
|
24 | 24 | ChartView { |
|
25 | 25 | title: "Stacked bar series" |
|
26 | 26 | anchors.fill: parent |
|
27 | 27 | theme: ChartView.ChartThemeLight |
|
28 | 28 | legend.alignment: Qt.AlignBottom |
|
29 | 29 | animationOptions: ChartView.SeriesAnimations |
|
30 | 30 | |
|
31 | 31 | property variant series: mySeries |
|
32 | 32 | |
|
33 | 33 | HorizontalStackedBarSeries { |
|
34 | 34 | id: mySeries |
|
35 | 35 | name: "bar" |
|
36 |
axis |
|
|
36 | axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } | |
|
37 | 37 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] |
|
38 | 38 | onClicked: console.log("barset.onClicked: " + index); |
|
39 | 39 | onHovered: console.log("barset.onHovered: " + status); |
|
40 | 40 | onPenChanged: console.log("barset.onPenChanged: " + pen); |
|
41 | 41 | onBrushChanged: console.log("barset.onBrushChanged: " + brush); |
|
42 | 42 | onLabelChanged: console.log("barset.onLabelChanged: " + label); |
|
43 | 43 | onLabelBrushChanged: console.log("barset.onLabelBrushChanged: " + labelBrush); |
|
44 | 44 | onLabelFontChanged: console.log("barset.onLabelFontChanged: " + labelFont); |
|
45 | 45 | onColorChanged: console.log("barset.onColorChanged: " + color); |
|
46 | 46 | onBorderColorChanged: console.log("barset.onBorderColorChanged: " + color); |
|
47 | 47 | onLabelColorChanged: console.log("barset.onLabelColorChanged: " + color); |
|
48 | 48 | onCountChanged: console.log("barset.onCountChanged: " + count); |
|
49 | 49 | onValuesAdded: console.log("barset.onValuesAdded: " + index + ", " + count); |
|
50 | 50 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); |
|
51 | 51 | onValueChanged: console.log("barset.onValuesChanged: " + index); |
|
52 | 52 | } |
|
53 | 53 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } |
|
54 | 54 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } |
|
55 | 55 | |
|
56 | 56 | onNameChanged: console.log("stackedBarSeries.onNameChanged: " + series.name); |
|
57 | 57 | onVisibleChanged: console.log("stackedBarSeries.onVisibleChanged: " + series.visible); |
|
58 | 58 | onClicked: console.log("stackedBarSeries.onClicked: " + barset + " " + index); |
|
59 | 59 | onHovered: console.log("stackedBarSeries.onHovered: " + barset + " " + status); |
|
60 | 60 | onLabelsVisibleChanged: console.log("stackedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); |
|
61 | 61 | onCountChanged: console.log("stackedBarSeries.onCountChanged: " + count); |
|
62 | 62 | } |
|
63 | 63 | } |
General Comments 0
You need to be logged in to leave comments.
Login now