| 1 |
// Copyright (C) 2023 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause |
| 3 |
|
| 4 |
import QtQuick |
| 5 |
import QtCharts |
| 6 |
|
| 7 |
//![1] |
| 8 |
ChartView { |
| 9 |
title: "Horizontal Percent Bar Chart" |
| 10 |
anchors.fill: parent |
| 11 |
legend.alignment: Qt.AlignBottom |
| 12 |
antialiasing: true |
| 13 |
|
| 14 |
HorizontalPercentBarSeries { |
| 15 |
axisY: BarCategoryAxis { categories: ["2007", "2008", "2009", "2010", "2011", "2012" ] } |
| 16 |
BarSet { label: "Bob"; values: [2, 2, 3, 4, 5, 6] } |
| 17 |
BarSet { label: "Susan"; values: [5, 1, 2, 4, 1, 7] } |
| 18 |
BarSet { label: "James"; values: [3, 5, 8, 13, 5, 8] } |
| 19 |
} |
| 20 |
} |
| 21 |
//![1] |