+ if (points > 0) {
+ QPen pen = QPen(linecolour, 8.0, Qt::SolidLine, Qt::RoundCap, Qt::RoundJoin);
+ painter->setPen(pen);
+ painter->setBrush(Qt::NoBrush);
+
+ QPointF point[points];
+ count = 0;
+ for (QList<float>::const_iterator iter = linedata.constBegin(); (count < points) && (iter != linedata.constEnd()); iter++) {
+ float lineheight = ((*iter) - miny) / (maxy - miny);
+ lineheight = qBound(0.0f, lineheight, 1.0f) * (size.height() - labelygap - axiswidth - (labelheight / 2.0));
+ point[count] = QPointF(labelxgap + axiswidth + (pointfullwidth * count) + (pointfullwidth / 2.0), size.height() - labelygap - lineheight - axiswidth);
+ count++;
+ }
+ painter->setClipRect(0, 0, labelxgap + axiswidth + (pointfullwidth / 2.0) - 8.0 + (size.width() - labelxgap - axiswidth - pointfullwidth + 16.0) * animate, size.height(), Qt::ReplaceClip);
+ painter->setClipping(true);
+ painter->drawPolyline(point, points);
+ }
+
+ painter->setClipping(false);
+