summaryrefslogtreecommitdiffstats
path: root/basicsuite/enterprise-charts/View7.qml
diff options
context:
space:
mode:
Diffstat (limited to 'basicsuite/enterprise-charts/View7.qml')
-rw-r--r--basicsuite/enterprise-charts/View7.qml20
1 files changed, 11 insertions, 9 deletions
diff --git a/basicsuite/enterprise-charts/View7.qml b/basicsuite/enterprise-charts/View7.qml
index c8b6654..5b5426c 100644
--- a/basicsuite/enterprise-charts/View7.qml
+++ b/basicsuite/enterprise-charts/View7.qml
@@ -51,22 +51,24 @@
import QtQuick 2.0
import QtCharts 2.0
-Rectangle {
+Item {
anchors.fill: parent
-
//![1]
- ChartView {
+ BaseChart {
title: "Stacked Bar series"
anchors.fill: parent
- legend.alignment: Qt.AlignBottom
- antialiasing: true
-
StackedBarSeries {
id: mySeries
axisX: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] }
- BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] }
- BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] }
- BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] }
+ BarSet { label: "Bob"; color: defaultGreen; values: [2, 2, 3, 4, 5, 6] }
+ BarSet { label: "Susan"; color: defaultGrey; values: [5, 1, 2, 4, 1, 7] }
+ BarSet { label: "James"; color: secondaryGrey; values: [3, 5, 8, 13, 5, 8] }
+ }
+ Component.onCompleted: {
+ axes[0].labelsColor = "white";
+ axes[1].labelsColor = "white";
+ axes[0].labelsFont = appFont;
+ axes[1].labelsFont = appFont;
}
}
//![1]