@@ -201,10 +201,11 void AreaChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt | |||
|
201 | 201 | painter->setPen(QPen(m_pointLabelsColor)); |
|
202 | 202 | QFontMetrics fm(painter->font()); |
|
203 | 203 | |
|
204 |
QString pointLabel |
|
|
204 | QString pointLabel; | |
|
205 | 205 | |
|
206 | 206 | if (m_series->upperSeries()) { |
|
207 | 207 | for (int i(0); i < m_series->upperSeries()->count(); i++) { |
|
208 | pointLabel = m_pointLabelsFormat; | |
|
208 | 209 | pointLabel.replace(xPointTag, |
|
209 | 210 | presenter()->numberToString(m_series->upperSeries()->at(i).x())); |
|
210 | 211 | pointLabel.replace(yPointTag, |
@@ -222,6 +223,7 void AreaChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt | |||
|
222 | 223 | |
|
223 | 224 | if (m_series->lowerSeries()) { |
|
224 | 225 | for (int i(0); i < m_series->lowerSeries()->count(); i++) { |
|
226 | pointLabel = m_pointLabelsFormat; | |
|
225 | 227 | pointLabel.replace(xPointTag, |
|
226 | 228 | presenter()->numberToString(m_series->lowerSeries()->at(i).x())); |
|
227 | 229 | pointLabel.replace(yPointTag, |
@@ -232,7 +234,6 void AreaChartItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt | |||
|
232 | 234 | QPointF position(m_lower->geometryPoints().at(i)); |
|
233 | 235 | position.setX(position.x() - pointLabelWidth / 2); |
|
234 | 236 | position.setY(position.y() - m_series->lowerSeries()->pen().width() / 2 - labelOffset); |
|
235 | ||
|
236 | 237 | painter->drawText(position, pointLabel); |
|
237 | 238 | } |
|
238 | 239 | } |
General Comments 0
You need to be logged in to leave comments.
Login now