@@ -30,11 +30,7 ChartView { | |||
|
30 | 30 | AreaSeries { |
|
31 | 31 | id: areaSeries |
|
32 | 32 | name: "area 1" |
|
33 | axisX: CategoriesAxis { | |
|
34 | id: categoriesAxis | |
|
35 | categories: ["2000", "2001", "2002", "2003", "2004", "2005", "2006", "2007", | |
|
36 | "2008", "2009", "2010", "2011" ] | |
|
37 | } | |
|
33 | ||
|
38 | 34 | upperSeries: LineSeries { |
|
39 | 35 | XYPoint { x: 0; y: 1 } |
|
40 | 36 | XYPoint { x: 1; y: 1 } |
@@ -71,5 +67,9 ChartView { | |||
|
71 | 67 | onColorChanged: console.log("areaSeries.onColorChanged: " + color); |
|
72 | 68 | onBorderColorChanged: console.log("areaSeries.onBorderColorChanged: " + borderColor); |
|
73 | 69 | // onCountChanged: console.log("areaSeries.onCountChanged: " + count); |
|
70 | ||
|
71 | Component.onCompleted: { | |
|
72 | createDefaultAxes(); | |
|
73 | } | |
|
74 | 74 |
|
|
75 | 75 | } |
@@ -22,18 +22,22 import QtQuick 1.0 | |||
|
22 | 22 | import QtCommercial.Chart 1.0 |
|
23 | 23 | |
|
24 | 24 | ChartView { |
|
25 |
title: " |
|
|
25 | title: "Grouped bar series" | |
|
26 | 26 | anchors.fill: parent |
|
27 | 27 | theme: ChartView.ChartThemeLight |
|
28 | 28 | legend.alignment: Qt.AlignBottom |
|
29 | 29 | |
|
30 |
property variant series: |
|
|
30 | property variant series: mySeries | |
|
31 | ||
|
32 | CategoriesAxis { | |
|
33 | id:myAxis; | |
|
34 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } | |
|
31 | 35 | |
|
32 | 36 | BarSeries { |
|
33 |
id: |
|
|
37 | id: mySeries | |
|
34 | 38 | name: "bar" |
|
35 | axisX: CategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } | |
|
36 |
BarSet { label: "Bob"; values: [ |
|
|
39 | ||
|
40 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] | |
|
37 | 41 | onClicked: console.log("barset.onClicked: " + index); |
|
38 | 42 | onHovered: console.log("barset.onHovered: " + status); |
|
39 | 43 | onPenChanged: console.log("barset.onPenChanged: " + pen); |
@@ -49,18 +53,20 ChartView { | |||
|
49 | 53 | onValuesRemoved: console.log("barset.onValuesRemoved: " + index + ", " + count); |
|
50 | 54 | onValueChanged: console.log("barset.onValuesChanged: " + index); |
|
51 | 55 | } |
|
52 |
BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, |
|
|
53 |
BarSet { label: "James"; values: [3, 5, 8, 5, |
|
|
56 | BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } | |
|
57 | BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } | |
|
54 | 58 | |
|
55 |
onNameChanged: console.log(" |
|
|
56 |
onVisibleChanged: console.log(" |
|
|
57 |
onClicked: console.log(" |
|
|
58 |
onHovered: console.log(" |
|
|
59 |
onLabelsVisibleChanged: console.log(" |
|
|
60 |
onCountChanged: console.log(" |
|
|
61 | onBarsetsAdded: console.log("barSeries.onBarsetsAdded: " + sets); // There is no point in this signal on QML side | |
|
62 | onAdded: console.log("barSeries.onBarsetAdded: " + barset); | |
|
63 | onBarsetsRemoved: console.log("barSeries.onBarsetsRemoved: " + sets); // There is no point in this signal on QML side | |
|
64 | onRemoved: console.log("barSeries.onBarsetRemoved: " + barset); | |
|
59 | onNameChanged: console.log("groupedBarSeries.onNameChanged: " + series.name); | |
|
60 | onVisibleChanged: console.log("groupedBarSeries.onVisibleChanged: " + series.visible); | |
|
61 | onClicked: console.log("groupedBarSeries.onClicked: " + barset + " " + index); | |
|
62 | onHovered: console.log("groupedBarSeries.onHovered: " + barset + " " + status); | |
|
63 | onLabelsVisibleChanged: console.log("groupedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); | |
|
64 | onCountChanged: console.log("groupedBarSeries.onCountChanged: " + count); | |
|
65 | 65 | } |
|
66 | ||
|
67 | Component.onCompleted: { | |
|
68 | createDefaultAxes(); | |
|
69 | setAxisX(myAxis,mySeries); | |
|
70 | } | |
|
71 | ||
|
66 | 72 |
} |
@@ -65,28 +65,32 ChartView { | |||
|
65 | 65 | legend.onBorderColorChanged: console.log("legend.onBorderColorChanged: " + color); |
|
66 | 66 | legend.onLabelColorChanged: console.log("legend.onLabelColorChanged: " + color); |
|
67 | 67 | |
|
68 | axisX.onColorChanged: console.log("axisX.onColorChanged: " + color); | |
|
69 | axisX.onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible); | |
|
70 | axisX.onLabelsColorChanged: console.log("axisX.onLabelsColorChanged: " + color); | |
|
71 | axisX.onVisibleChanged: console.log("axisX.onVisibleChanged: " + visible); | |
|
72 | axisX.onGridVisibleChanged: console.log("axisX.onGridVisibleChanged: " + visible); | |
|
73 | axisX.onShadesVisibleChanged: console.log("axisX.onShadesVisibleChanged: " + visible); | |
|
74 | axisX.onShadesColorChanged: console.log("axisX.onShadesColorChanged: " + color); | |
|
75 | axisX.onShadesBorderColorChanged: console.log("axisX.onShadesBorderColorChanged: " + color); | |
|
76 | axisX.onMinChanged: console.log("axisX.onMinChanged: " + min); | |
|
77 | axisX.onMaxChanged: console.log("axisX.onMaxChanged: " + max); | |
|
78 | 68 | |
|
79 | axisY.onColorChanged: console.log("axisY.onColorChanged: " + color); | |
|
80 |
|
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 | axisY.onMinChanged: console.log("axisY.onMinChanged: " + min); | |
|
88 |
|
|
|
69 | ValuesAxis{ | |
|
70 | onColorChanged: console.log("axisX.onColorChanged: " + color); | |
|
71 | onLabelsVisibleChanged: console.log("axisX.onLabelsVisibleChanged: " + visible); | |
|
72 | onLabelsColorChanged: console.log("axisX.onLabelsColorChanged: " + color); | |
|
73 | onVisibleChanged: console.log("axisX.onVisibleChanged: " + visible); | |
|
74 | onGridVisibleChanged: console.log("axisX.onGridVisibleChanged: " + visible); | |
|
75 | onShadesVisibleChanged: console.log("axisX.onShadesVisibleChanged: " + visible); | |
|
76 | onShadesColorChanged: console.log("axisX.onShadesColorChanged: " + color); | |
|
77 | onShadesBorderColorChanged: console.log("axisX.onShadesBorderColorChanged: " + color); | |
|
78 | onMinChanged: console.log("axisX.onMinChanged: " + min); | |
|
79 | onMaxChanged: console.log("axisX.onMaxChanged: " + max); | |
|
80 | } | |
|
89 | 81 | |
|
82 | ValuesAxis{ | |
|
83 | onColorChanged: console.log("axisY.onColorChanged: " + color); | |
|
84 | onLabelsVisibleChanged: console.log("axisY.onLabelsVisibleChanged: " + visible); | |
|
85 | onLabelsColorChanged: console.log("axisY.onLabelsColorChanged: " + color); | |
|
86 | onVisibleChanged: console.log("axisY.onVisibleChanged: " + visible); | |
|
87 | onGridVisibleChanged: console.log("axisY.onGridVisibleChanged: " + visible); | |
|
88 | onShadesVisibleChanged: console.log("axisY.onShadesVisibleChanged: " + visible); | |
|
89 | onShadesColorChanged: console.log("axisY.onShadesColorChanged: " + color); | |
|
90 | onShadesBorderColorChanged: console.log("axisY.onShadesBorderColorChanged: " + color); | |
|
91 | onMinChanged: console.log("axisY.onMinChanged: " + min); | |
|
92 | onMaxChanged: console.log("axisY.onMaxChanged: " + max); | |
|
93 | } | |
|
90 | 94 | |
|
91 | 95 | Rectangle { |
|
92 | 96 | id: marginVisualizer |
@@ -103,4 +107,8 ChartView { | |||
|
103 | 107 | NumberAnimation { duration: 800 } |
|
104 | 108 | } |
|
105 | 109 | } |
|
110 | ||
|
111 | Component.onCompleted: { | |
|
112 | createDefaultAxes(); | |
|
113 | } | |
|
106 | 114 | } |
@@ -58,4 +58,8 ChartView { | |||
|
58 | 58 | XYPoint { x: 4.1; y: 2.3 } |
|
59 | 59 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
60 | 60 | } |
|
61 | ||
|
62 | Component.onCompleted: { | |
|
63 | createDefaultAxes(); | |
|
64 | } | |
|
61 | 65 | } |
@@ -27,12 +27,16 ChartView { | |||
|
27 | 27 | theme: ChartView.ChartThemeLight |
|
28 | 28 | legend.alignment: Qt.AlignBottom |
|
29 | 29 | |
|
30 |
property variant series: |
|
|
30 | property variant series: mySeries | |
|
31 | ||
|
32 | CategoriesAxis { | |
|
33 | id: myAxis | |
|
34 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] | |
|
35 | } | |
|
31 | 36 | |
|
32 | 37 | PercentBarSeries { |
|
33 |
id: |
|
|
38 | id: mySeries | |
|
34 | 39 | name: "bar" |
|
35 | axisX: CategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } | |
|
36 | 40 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] |
|
37 | 41 | onClicked: console.log("barset.onClicked: " + index); |
|
38 | 42 | onHovered: console.log("barset.onHovered: " + status); |
@@ -59,4 +63,9 ChartView { | |||
|
59 | 63 | onLabelsVisibleChanged: console.log("percentBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); |
|
60 | 64 | onCountChanged: console.log("percentBarSeries.onCountChanged: " + count); |
|
61 | 65 | } |
|
66 | ||
|
67 | Component.onCompleted: { | |
|
68 | createDefaultAxes(); | |
|
69 | setAxisX(myAxis,mySeries); | |
|
70 | } | |
|
62 | 71 | } |
@@ -57,4 +57,8 ChartView { | |||
|
57 | 57 | XYPoint { x: 2.67; y: 2.65 } |
|
58 | 58 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
59 | 59 | } |
|
60 | ||
|
61 | Component.onCompleted: { | |
|
62 | createDefaultAxes(); | |
|
63 | } | |
|
60 | 64 | } |
@@ -57,4 +57,8 ChartView { | |||
|
57 | 57 | XYPoint { x: 4.1; y: 2.3 } |
|
58 | 58 | onClicked: console.log(name + ".onClicked: " + point.x + ", " + point.y); |
|
59 | 59 | } |
|
60 | ||
|
61 | Component.onCompleted: { | |
|
62 | createDefaultAxes(); | |
|
63 | } | |
|
60 | 64 | } |
@@ -27,12 +27,16 ChartView { | |||
|
27 | 27 | theme: ChartView.ChartThemeLight |
|
28 | 28 | legend.alignment: Qt.AlignBottom |
|
29 | 29 | |
|
30 |
property variant series: |
|
|
30 | property variant series: mySeries | |
|
31 | ||
|
32 | CategoriesAxis { | |
|
33 | id: myAxis | |
|
34 | categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] | |
|
35 | } | |
|
31 | 36 | |
|
32 | 37 | StackedBarSeries { |
|
33 |
id: |
|
|
38 | id: mySeries | |
|
34 | 39 | name: "bar" |
|
35 | axisX: CategoriesAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } | |
|
36 | 40 | BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] |
|
37 | 41 | onClicked: console.log("barset.onClicked: " + index); |
|
38 | 42 | onHovered: console.log("barset.onHovered: " + status); |
@@ -59,4 +63,9 ChartView { | |||
|
59 | 63 | onLabelsVisibleChanged: console.log("stackedBarSeries.onLabelsVisibleChanged: " + series.labelsVisible); |
|
60 | 64 | onCountChanged: console.log("stackedBarSeries.onCountChanged: " + count); |
|
61 | 65 | } |
|
66 | ||
|
67 | Component.onCompleted: { | |
|
68 | createDefaultAxes(); | |
|
69 | setAxisX(myAxis,mySeries); | |
|
70 | } | |
|
62 | 71 | } |
@@ -26,7 +26,7 Rectangle { | |||
|
26 | 26 | width: parent.width |
|
27 | 27 | height: parent.height |
|
28 | 28 | property int viewNumber: 0 |
|
29 |
property int viewCount: |
|
|
29 | property int viewCount: 9 | |
|
30 | 30 | property variant colors: ["#637D74", "#403D3A", "#8C3B3B", "#AB6937", "#D4A960"] |
|
31 | 31 | property int colorIndex: 0 |
|
32 | 32 | |
@@ -58,12 +58,9 Rectangle { | |||
|
58 | 58 | chartLoader.source = "BarChart.qml"; |
|
59 | 59 | editorLoader.source = "BarEditor.qml"; |
|
60 | 60 | } else if (viewNumber == 7) { |
|
61 | chartLoader.source = "GroupedBarChart.qml"; | |
|
62 | editorLoader.source = "BarEditor.qml"; | |
|
63 | } else if (viewNumber == 8) { | |
|
64 | 61 | chartLoader.source = "StackedBarChart.qml"; |
|
65 | 62 | editorLoader.source = "BarEditor.qml"; |
|
66 |
} else if (viewNumber == |
|
|
63 | } else if (viewNumber == 8) { | |
|
67 | 64 | chartLoader.source = "PercentBarChart.qml"; |
|
68 | 65 | editorLoader.source = "BarEditor.qml"; |
|
69 | 66 | } else { |
@@ -14,7 +14,6 | |||
|
14 | 14 | <file>qml/qmlchartproperties/BarEditor.qml</file> |
|
15 | 15 | <file>qml/qmlchartproperties/ScatterEditor.qml</file> |
|
16 | 16 | <file>qml/qmlchartproperties/AreaEditor.qml</file> |
|
17 | <file>qml/qmlchartproperties/GroupedBarChart.qml</file> | |
|
18 | 17 | <file>qml/qmlchartproperties/StackedBarChart.qml</file> |
|
19 | 18 | <file>qml/qmlchartproperties/PercentBarChart.qml</file> |
|
20 | 19 | <file>qml/qmlchartproperties/Chart.qml</file> |
General Comments 0
You need to be logged in to leave comments.
Login now