diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-10-03 14:26:46 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-10-04 08:19:30 +0300 |
commit | d879027ac73093e51d3470e9aea87aa5479a0ef1 (patch) | |
tree | a7be8452ce0908d3b7ed58413915b5072a83fd8c /examples/qmlbars/qml/qmlbars/axes.qml | |
parent | 7e35ce01ac38fea1d7c3ce51ab9c24fdf6e7453c (diff) |
Replace 'chart' with 'graph'
Task-number: QTRD-2369
Change-Id: Ic39bc03a0eee4fe75978e71af06ad7a655e958a9
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'examples/qmlbars/qml/qmlbars/axes.qml')
-rw-r--r-- | examples/qmlbars/qml/qmlbars/axes.qml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/examples/qmlbars/qml/qmlbars/axes.qml b/examples/qmlbars/qml/qmlbars/axes.qml new file mode 100644 index 00000000..b0ba3eb2 --- /dev/null +++ b/examples/qmlbars/qml/qmlbars/axes.qml @@ -0,0 +1,50 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc +** All rights reserved. +** For any questions to Digia, please use contact form at http://qt.digia.com +** +** This file is part of the QtDataVisualization module. +** +** Licensees holding valid Qt Enterprise licenses may use this file in +** accordance with the Qt Enterprise License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. +** +** If you have questions regarding the use of this file, please use +** contact form at http://qt.digia.com +** +****************************************************************************/ + +import QtQuick 2.1 +import com.digia.QtDataVisualization 1.0 + +Item { + property alias column: columnAxis + property alias expenses: expensesAxis + property alias income: incomeAxis + + // For row labels we can use row labels from data proxy, so default axis + // suffices for rows. + + // Custom labels for columns, since the data contains abbreviated month names. + CategoryAxis3D { + id: columnAxis + categoryLabels: ["January", "February", "March", "April", "May", "June", + "July", "August", "September", "October", "November", "December"] + } + ValueAxis3D { + id: incomeAxis + min: 0 + max: 35 + labelFormat: "%.2f M\u20AC" + title: "Monthly income" + } + ValueAxis3D { + id: expensesAxis + min: 0 + max: 35 + labelFormat: "-%.2f M\u20AC" + title: "Monthly expenses" + } +} |