From 7c41444789be188fc47b3d68f4431d85d52d1e46 Mon Sep 17 00:00:00 2001 From: Juho Annunen Date: Tue, 17 Apr 2018 13:57:22 +0300 Subject: Update Charts demo to new UI theme Task-number: QTBUG-62792 Change-Id: I95c6fb038f5d427da2ed1ee6698e1afcfa436eee Reviewed-by: Sami Nurmenniemi --- basicsuite/enterprise-charts/View10.qml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'basicsuite/enterprise-charts/View10.qml') diff --git a/basicsuite/enterprise-charts/View10.qml b/basicsuite/enterprise-charts/View10.qml index adcd350..79ca4ab 100644 --- a/basicsuite/enterprise-charts/View10.qml +++ b/basicsuite/enterprise-charts/View10.qml @@ -51,21 +51,24 @@ import QtQuick 2.0 import QtCharts 2.0 -Rectangle { +Item { anchors.fill: parent - //![1] - ChartView { + BaseChart { title: "Horizontal Stacked Bar series" anchors.fill: parent - legend.alignment: Qt.AlignBottom - antialiasing: true HorizontalStackedBarSeries { axisY: 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] -- cgit v1.2.3