diff options
Diffstat (limited to 'src/charts/areachart/areachartitem.cpp')
-rw-r--r-- | src/charts/areachart/areachartitem.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/charts/areachart/areachartitem.cpp b/src/charts/areachart/areachartitem.cpp index 58f2c367..e4ebf80a 100644 --- a/src/charts/areachart/areachartitem.cpp +++ b/src/charts/areachart/areachartitem.cpp @@ -278,7 +278,7 @@ void AreaChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt presenter()->numberToString(m_series->upperSeries()->at(i).y())); // Position text in relation to the point - int pointLabelWidth = fm.width(pointLabel); + int pointLabelWidth = fm.horizontalAdvance(pointLabel); QPointF position(m_upper->geometryPoints().at(i)); position.setX(position.x() - pointLabelWidth / 2); position.setY(position.y() - m_series->upperSeries()->pen().width() / 2 @@ -296,7 +296,7 @@ void AreaChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt presenter()->numberToString(m_series->lowerSeries()->at(i).y())); // Position text in relation to the point - int pointLabelWidth = fm.width(pointLabel); + int pointLabelWidth = fm.horizontalAdvance(pointLabel); QPointF position(m_lower->geometryPoints().at(i)); position.setX(position.x() - pointLabelWidth / 2); position.setY(position.y() - m_series->lowerSeries()->pen().width() / 2 |