@@ -247,6 +247,7 void ChartPresenter::handleSeriesAdded(QSeries* series,Domain* domain) | |||
|
247 | 247 | } |
|
248 | 248 | |
|
249 | 249 | case QSeries::SeriesTypeScatter: { |
|
250 | ||
|
250 | 251 | QScatterSeries *scatterSeries = static_cast<QScatterSeries *>(series); |
|
251 | 252 | ScatterChartItem *scatter = new ScatterChartItem(scatterSeries,this); |
|
252 | 253 | if(m_options.testFlag(QChart::SeriesAnimations)) { |
@@ -343,7 +344,6 void ChartPresenter::setAnimationOptions(QChart::AnimationOptions options) | |||
|
343 | 344 | |
|
344 | 345 | if(m_options!=QChart::NoAnimation && !m_animator) { |
|
345 | 346 | m_animator= new ChartAnimator(this); |
|
346 | ||
|
347 | 347 | } |
|
348 | 348 | resetAllElements(); |
|
349 | 349 | } |
@@ -504,9 +504,13 void ChartPresenter::updateLayout() | |||
|
504 | 504 | m_backgroundItem->setRect(m_rect.adjusted(m_marginTiny,m_marginTiny, -m_marginTiny, -m_marginTiny)); |
|
505 | 505 | } |
|
506 | 506 | |
|
507 |
|
|
|
507 | QRectF chartRect = m_rect.adjusted(m_chartMargins.left(),m_chartMargins.top(),-m_chartMargins.right(),-m_chartMargins.bottom()); | |
|
508 | 508 | |
|
509 | if(m_chartRect!=chartRect){ | |
|
510 | m_chartRect=chartRect; | |
|
509 | 511 | emit geometryChanged(m_chartRect); |
|
512 | } | |
|
513 | ||
|
510 | 514 | legend->setGeometry(m_rect.adjusted(m_legendMargins.left(),m_legendMargins.top(),-m_legendMargins.right(),-m_legendMargins.bottom())); |
|
511 | 515 | } |
|
512 | 516 |
General Comments 0
You need to be logged in to leave comments.
Login now