diff --git a/src/axisitem.cpp b/src/axisitem.cpp index 0686f32..540cea9 100644 --- a/src/axisitem.cpp +++ b/src/axisitem.cpp @@ -172,6 +172,7 @@ void AxisItem::handleLabelsChanged(QChartAxis* axis,const QStringList& labels) clear(); m_thicksList=labels; createItems(m_thicksList.size()); + updateItem(m_thicksList.size()); items = m_labels.childItems(); handleAxisUpdate(axis); } diff --git a/src/chartpresenter.cpp b/src/chartpresenter.cpp index 60c844b..e767dc6 100644 --- a/src/chartpresenter.cpp +++ b/src/chartpresenter.cpp @@ -84,6 +84,9 @@ void ChartPresenter::handleAxisAdded(QChartAxis* axis) } QObject::connect(this,SIGNAL(geometryChanged(const QRectF&)),item,SLOT(handleGeometryChanged(const QRectF&))); QObject::connect(axis,SIGNAL(update(QChartAxis*)),item,SLOT(handleAxisUpdate(QChartAxis*))); + + item->handleAxisUpdate(axis); + item->handleGeometryChanged(m_rect); m_chartTheme->decorate(axis,item); m_axisItems.insert(axis,item); }