| 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 |
PolarChartView { |
| 9 |
title: "Two Series, Common Axes" |
| 10 |
anchors.fill: parent |
| 11 |
legend.visible: false |
| 12 |
antialiasing: true |
| 13 |
|
| 14 |
ValueAxis { |
| 15 |
id: axisAngular |
| 16 |
min: 0 |
| 17 |
max: 20 |
| 18 |
tickCount: 9 |
| 19 |
} |
| 20 |
|
| 21 |
ValueAxis { |
| 22 |
id: axisRadial |
| 23 |
min: -0.5 |
| 24 |
max: 1.5 |
| 25 |
} |
| 26 |
|
| 27 |
SplineSeries { |
| 28 |
id: series1 |
| 29 |
axisAngular: axisAngular |
| 30 |
axisRadial: axisRadial |
| 31 |
pointsVisible: true |
| 32 |
} |
| 33 |
|
| 34 |
ScatterSeries { |
| 35 |
id: series2 |
| 36 |
axisAngular: axisAngular |
| 37 |
axisRadial: axisRadial |
| 38 |
markerSize: 10 |
| 39 |
} |
| 40 |
|
| 41 |
// Add data dynamically to the series |
| 42 |
Component.onCompleted: { |
| 43 |
for (var i = 0; i <= 20; i++) { |
| 44 |
series1.append(i, Math.random()); |
| 45 |
series2.append(i, Math.random()); |
| 46 |
} |
| 47 |
} |
| 48 |
} |
| 49 |
//![1] |