1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "declarativepolarchart_p.h"
5#include <QtCharts/QChart>
6
7QT_BEGIN_NAMESPACE
8
9/*!
10 \qmltype PolarChartView
11 \inherits ChartView
12 \inqmlmodule QtCharts
13
14 \brief Presents data in polar charts.
15
16 Polar charts present data in a circular graph, where the placement of data
17 is based on the angle and distance from the center of the graph, the
18 \e pole.
19
20 \image examples_qmlpolarchart1.png
21
22 A polar chart is a specialization of the ChartView type. It supports line,
23 spline, area, and scatter series, and all axis types supported by them. Each
24 axis can be used either as a radial or an angular axis.
25
26 The first and last tick mark on an angular ValueAxis are co-located at a
27 0/360 degree angle.
28
29 If the angular distance between two consecutive points in a series is more
30 than 180 degrees, any direct line connecting the two points becomes
31 meaningless, and will not be drawn. Instead, a line will be drawn to and
32 from the center of the chart. Therefore, the axis ranges must be chosen
33 accordingly when displaying line, spline, or area series.
34
35 Polar charts draw all axes of the same orientation in the same position, so
36 using multiple axes of the same orientation can be confusing, unless the
37 extra axes are only used to customize the grid. For example, you can display
38 a highlighted range with a secondary shaded CategoryAxis or provide
39 unlabeled subticks with a secondary ValueAxis thas has hidden labels.
40
41 The following QML code shows how to create a polar chart with a spline and
42 scatter series and two value axes:
43 \snippet qmlchartsgallery/qml/TwoSeriesPolar.qml 1
44*/
45
46DeclarativePolarChart::DeclarativePolarChart(QQuickItem *parent)
47 : DeclarativeChart(QChart::ChartTypePolar, parent)
48{
49}
50
51DeclarativePolarChart::~DeclarativePolarChart()
52{
53}
54
55QT_END_NAMESPACE
56
57#include "moc_declarativepolarchart_p.cpp"
58

source code of qtcharts/src/chartsqml2/declarativepolarchart.cpp