summaryrefslogtreecommitdiffstats
path: root/basicsuite/enterprise-charts/View8.qml
diff options
context:
space:
mode:
Diffstat (limited to 'basicsuite/enterprise-charts/View8.qml')
-rw-r--r--basicsuite/enterprise-charts/View8.qml21
1 files changed, 12 insertions, 9 deletions
diff --git a/basicsuite/enterprise-charts/View8.qml b/basicsuite/enterprise-charts/View8.qml
index fbb30e3..803b6cd 100644
--- a/basicsuite/enterprise-charts/View8.qml
+++ b/basicsuite/enterprise-charts/View8.qml
@@ -51,21 +51,24 @@
import QtQuick 2.0
import QtCharts 2.0
-Rectangle {
+Item {
anchors.fill: parent
-
//![1]
- ChartView {
+ BaseChart {
title: "Percent Bar series"
anchors.fill: parent
- legend.alignment: Qt.AlignBottom
- antialiasing: true
-
PercentBarSeries {
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: _primaryGreen; values: [2, 2, 3, 4, 5, 6] }
+ BarSet { label: "Susan"; color: _primaryGrey; 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]