@@ -841,11 +841,12 void QXYSeriesPrivate::drawSeriesPointLabels(QPainter *painter, const QVector<QP | |||
|
841 | 841 | painter->setFont(m_pointLabelsFont); |
|
842 | 842 | painter->setPen(QPen(m_pointLabelsColor)); |
|
843 | 843 | QFontMetrics fm(painter->font()); |
|
844 | ||
|
845 | for (int i(0); i < points.size(); i++) { | |
|
844 | // m_points is used for the label here as it has the series point information | |
|
845 | // points variable passed is used for positioning because it has the coordinates | |
|
846 | for (int i(0); i < m_points.size(); i++) { | |
|
846 | 847 | QString pointLabel = m_pointLabelsFormat; |
|
847 | pointLabel.replace(xPointTag, presenter()->numberToString(points.at(i).x())); | |
|
848 | pointLabel.replace(yPointTag, presenter()->numberToString(points.at(i).y())); | |
|
848 | pointLabel.replace(xPointTag, presenter()->numberToString(m_points.at(i).x())); | |
|
849 | pointLabel.replace(yPointTag, presenter()->numberToString(m_points.at(i).y())); | |
|
849 | 850 | |
|
850 | 851 | // Position text in relation to the point |
|
851 | 852 | int pointLabelWidth = fm.width(pointLabel); |
General Comments 0
You need to be logged in to leave comments.
Login now