| 1 |
// Copyright (C) 2023 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause |
| 3 |
|
| 4 |
import QtCharts |
| 5 |
|
| 6 |
//![1] |
| 7 |
ChartView { |
| 8 |
title: "Numerical Data for Dummies" |
| 9 |
anchors.fill: parent |
| 10 |
legend.visible: false |
| 11 |
antialiasing: true |
| 12 |
|
| 13 |
LineSeries { |
| 14 |
axisY: CategoryAxis { |
| 15 |
min: 0 |
| 16 |
max: 30 |
| 17 |
CategoryRange { |
| 18 |
label: "critical" |
| 19 |
endValue: 2 |
| 20 |
} |
| 21 |
CategoryRange { |
| 22 |
label: "low" |
| 23 |
endValue: 4 |
| 24 |
} |
| 25 |
CategoryRange { |
| 26 |
label: "normal" |
| 27 |
endValue: 7 |
| 28 |
} |
| 29 |
CategoryRange { |
| 30 |
label: "high" |
| 31 |
endValue: 15 |
| 32 |
} |
| 33 |
CategoryRange { |
| 34 |
label: "extremely high" |
| 35 |
endValue: 30 |
| 36 |
} |
| 37 |
} |
| 38 |
|
| 39 |
XYPoint { x: 0; y: 4.3 } |
| 40 |
XYPoint { x: 1; y: 4.1 } |
| 41 |
XYPoint { x: 2; y: 4.7 } |
| 42 |
XYPoint { x: 3; y: 3.9 } |
| 43 |
XYPoint { x: 4; y: 5.2 } |
| 44 |
} |
| 45 |
} |
| 46 |
//![1] |