summaryrefslogtreecommitdiffstats
path: root/examples/qmlbars
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2013-12-09 10:49:49 +0200
committerTomi Korpipää <tomi.korpipaa@digia.com>2013-12-10 09:01:45 +0200
commit3573055abe42ff283d011d8550bc8495156338a1 (patch)
treebb45d4f7e32a0c63329d9f52639081162b34e17e /examples/qmlbars
parent22557b312570cbefde584466a28f2b9bfcc570ba (diff)
Move series specific visual elements to series, part 4
Colors to series - Multiselection labels in bar slices still buggy - Selection in bars doesn't work correctly if not all series have items in that grid Task-number: QTRD-2557 Change-Id: Icd38428e5337a26b8410476104bb1f1f784cdc7f Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/qmlbars')
-rw-r--r--examples/qmlbars/qml/qmlbars/main.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/examples/qmlbars/qml/qmlbars/main.qml b/examples/qmlbars/qml/qmlbars/main.qml
index a4080f6d..768628f4 100644
--- a/examples/qmlbars/qml/qmlbars/main.qml
+++ b/examples/qmlbars/qml/qmlbars/main.qml
@@ -83,6 +83,14 @@ Item {
labelBorderEnabled: true
font.pointSize: 35
labelBackgroundEnabled: true
+ colorStyle: Theme3D.ColorStyleRangeGradient
+ singleHighlightGradient: customGradient
+
+ ColorGradient {
+ id: customGradient
+ ColorGradientStop { position: 1.0; color: "#FFFF00" }
+ ColorGradientStop { position: 0.0; color: "#808000" }
+ }
}
barThickness: 0.7
barSpacing: Qt.size(0.5, 0.5)
@@ -94,6 +102,7 @@ Item {
Bar3DSeries {
id: barSeries
itemLabelFormat: "Income for @colLabel, @rowLabel: @valueLabel"
+ baseGradient: barGradient
ItemModelBarDataProxy {
id: modelProxy
@@ -103,6 +112,12 @@ Item {
valueRole: "income"
}
+ ColorGradient {
+ id: barGradient
+ ColorGradientStop { position: 1.0; color: "#00FF00" }
+ ColorGradientStop { position: 0.0; color: "#006000" }
+ }
+
onSelectedBarChanged: handleSelectionChange(barSeries, position)
}
@@ -110,6 +125,7 @@ Item {
id: secondarySeries
visible: false
itemLabelFormat: "Expenses for @colLabel, @rowLabel: @valueLabel"
+ baseGradient: secondaryGradient
ItemModelBarDataProxy {
id: secondaryProxy
@@ -119,6 +135,12 @@ Item {
valueRole: "expenses"
}
+ ColorGradient {
+ id: secondaryGradient
+ ColorGradientStop { position: 1.0; color: "#FF0000" }
+ ColorGradientStop { position: 0.0; color: "#600000" }
+ }
+
onSelectedBarChanged: handleSelectionChange(secondarySeries, position)
}
}