Add graphs showing journeys/durations over last year
[harbour-pedalo.git] / src / graph.cpp
index d4a60d2..6cc38d5 100644 (file)
@@ -122,7 +122,7 @@ void Graph::paint(QPainter *painter) {
     painter->setBrush(Qt::NoBrush);
 
     if (labelsxcount > 0) {
-        for (count = 0; count < bars; count++) {
+        for (count = 0; count < labelsxcount; count++) {
             QRectF rect(labelxgap + axiswidth + (labelfullwidth * count), size.height() - labelygap + 8.0, labelfullwidth, labelygap - 8.0);
             painter->drawText(rect, Qt::AlignHCenter | Qt::NoClip | Qt::TextSingleLine, labelsx[count]);
             //painter->drawRect(rect);