@@ -484,6 +484,13 void ChartPresenter::updateLayout() | |||
|
484 | 484 | } |
|
485 | 485 | } |
|
486 | 486 | |
|
487 | if(m_rect.width()<2*(m_chartMargins.top()+m_chartMargins.bottom()) || m_rect.height()< 2*(m_chartMargins.top() + m_chartMargins.bottom())) | |
|
488 | { | |
|
489 | m_chart->setMinimumSize(2*(m_chartMargins.top()+m_chartMargins.bottom()),2*(m_chartMargins.top() + m_chartMargins.bottom())); | |
|
490 | return; | |
|
491 | } | |
|
492 | ||
|
493 | ||
|
487 | 494 | // recalculate title position |
|
488 | 495 | if (m_titleItem) { |
|
489 | 496 | QPointF center = m_rect.center() -m_titleItem->boundingRect().center(); |
@@ -495,6 +502,7 void ChartPresenter::updateLayout() | |||
|
495 | 502 | m_backgroundItem->setRect(m_rect.adjusted(m_marginTiny,m_marginTiny, -m_marginTiny, -m_marginTiny)); |
|
496 | 503 | } |
|
497 | 504 | |
|
505 | ||
|
498 | 506 | QRectF chartRect = m_rect.adjusted(m_chartMargins.left(),m_chartMargins.top(),-m_chartMargins.right(),-m_chartMargins.bottom()); |
|
499 | 507 | |
|
500 | 508 | legend->setGeometry(m_rect.adjusted(m_legendMargins.left(),m_legendMargins.top(),-m_legendMargins.right(),-m_legendMargins.bottom())); |
General Comments 0
You need to be logged in to leave comments.
Login now