@@ -111,17 +111,10 void ChartDataSet::addAxis(QAbstractAxis *axis, Qt::Alignment aligment) | |||||
111 | }; |
|
111 | }; | |
112 |
|
112 | |||
113 | AbstractDomain *newDomain; |
|
113 | AbstractDomain *newDomain; | |
114 |
if (m_chart && m_chart->chartType() == QChart::ChartTypePolar) |
|
114 | if (m_chart && m_chart->chartType() == QChart::ChartTypePolar) | |
115 | foreach (QAbstractAxis *existingAxis, axes()) { |
|
|||
116 | if (existingAxis->orientation() == axis->orientation()) { |
|
|||
117 | qWarning() << QObject::tr("Cannot add multiple axes of same orientation to a polar chart!"); |
|
|||
118 | return; |
|
|||
119 | } |
|
|||
120 | } |
|
|||
121 | newDomain = new XYPolarDomain(); |
|
115 | newDomain = new XYPolarDomain(); | |
122 |
|
|
116 | else | |
123 | newDomain = new XYDomain(); |
|
117 | newDomain = new XYDomain(); | |
124 | } |
|
|||
125 |
|
118 | |||
126 | QSharedPointer<AbstractDomain> domain(newDomain); |
|
119 | QSharedPointer<AbstractDomain> domain(newDomain); | |
127 | axis->d_ptr->initializeDomain(domain.data()); |
|
120 | axis->d_ptr->initializeDomain(domain.data()); |
@@ -49,7 +49,10 QTCOMMERCIALCHART_BEGIN_NAMESPACE | |||||
49 | when displaying line, spline, or area series. In such case series don't draw a direct line between |
|
49 | when displaying line, spline, or area series. In such case series don't draw a direct line between | |
50 | the two points, but instead draw a line to and from the center of the chart. |
|
50 | the two points, but instead draw a line to and from the center of the chart. | |
51 |
|
51 | |||
52 |
\note Polar charts d |
|
52 | \note Polar charts draw all axes of same orientation in the same position, so using multiple | |
|
53 | axes of same orientation can be confusing, unless the extra axes are only used to customize the | |||
|
54 | grid (e.g. you can display a highlighted range with a secondary shaded QCategoryAxis or provide | |||
|
55 | unlabeled subticks with a secondary QValueAxis that has its labels hidden). | |||
53 |
|
56 | |||
54 | \sa QChart |
|
57 | \sa QChart | |
55 | */ |
|
58 | */ |
General Comments 0
You need to be logged in to leave comments.
Login now