##// END OF EJS Templates
Fix QLogValueAxis update...
Titta Heikkala -
r2758:39be6d68b7b8
parent child
Show More
@@ -48,10 +48,10 QVector<qreal> ChartLogValueAxisX::calculateLayout() const
48 48 qreal ceilEdge = ceil(leftEdge);
49 49 int tickCount = qAbs(ceil(logMax) - ceil(logMin));
50 50
51 points.resize(tickCount);
51 points.resize(tickCount + 1);
52 52 const QRectF &gridRect = gridGeometry();
53 53 const qreal deltaX = gridRect.width() / qAbs(logMax - logMin);
54 for (int i = 0; i < tickCount; ++i)
54 for (int i = 0; i <= tickCount; ++i)
55 55 points[i] = (ceilEdge + qreal(i)) * deltaX - leftEdge * deltaX + gridRect.left();
56 56
57 57 return points;
@@ -47,10 +47,10 QVector<qreal> ChartLogValueAxisY::calculateLayout() const
47 47 qreal ceilEdge = ceil(leftEdge);
48 48 int tickCount = qAbs(ceil(logMax) - ceil(logMin));
49 49
50 points.resize(tickCount);
50 points.resize(tickCount + 1);
51 51 const QRectF &gridRect = gridGeometry();
52 52 const qreal deltaY = gridRect.height() / qAbs(logMax - logMin);
53 for (int i = 0; i < tickCount; ++i)
53 for (int i = 0; i <= tickCount; ++i)
54 54 points[i] = (ceilEdge + qreal(i)) * -deltaY - leftEdge * -deltaY + gridRect.bottom();
55 55
56 56 return points;
General Comments 0
You need to be logged in to leave comments. Login now