@@ -160,9 +160,14 void LineChartItem::updateGeometry() | |||
|
160 | 160 | } |
|
161 | 161 | |
|
162 | 162 | bool dummyOk; // We know points are ok, but this is needed |
|
163 | qreal currentAngle = static_cast<PolarDomain *>(domain())->toAngularCoordinate(currentSeriesPoint.x(), dummyOk); | |
|
164 | qreal previousAngle = static_cast<PolarDomain *>(domain())->toAngularCoordinate(m_series->at(i - 1).x(), dummyOk); | |
|
165 | ||
|
163 | qreal currentAngle = 0; | |
|
164 | qreal previousAngle = 0; | |
|
165 | if (const PolarDomain *pd = qobject_cast<const PolarDomain *>(domain())) { | |
|
166 | currentAngle = pd->toAngularCoordinate(currentSeriesPoint.x(), dummyOk); | |
|
167 | previousAngle = pd->toAngularCoordinate(m_series->at(i - 1).x(), dummyOk); | |
|
168 | } else { | |
|
169 | qWarning() << Q_FUNC_INFO << "Unexpected domain: " << domain(); | |
|
170 | } | |
|
166 | 171 | if ((qAbs(currentAngle - previousAngle) > 180.0)) { |
|
167 | 172 | // If the angle between two points is over 180 degrees (half X range), |
|
168 | 173 | // any direct segment between them becomes meaningless. |
General Comments 0
You need to be logged in to leave comments.
Login now