##// END OF EJS Templates
Bugfix precision error when calculating layout in valueaxis
Michal Klocek -
r2144:c7788799f12f
parent child
Show More
@@ -50,8 +50,7 QVector<qreal> ChartValueAxisX::calculateLayout() const
50 50 const QRectF &gridRect = gridGeometry();
51 51 const qreal deltaX = gridRect.width() / (m_tickCount - 1);
52 52 for (int i = 0; i < m_tickCount; ++i) {
53 int x = i * deltaX + gridRect.left();
54 points[i] = x;
53 points[i] = i * deltaX + gridRect.left();
55 54 }
56 55 return points;
57 56 }
@@ -52,8 +52,7 QVector<qreal> ChartValueAxisY::calculateLayout() const
52 52
53 53 const qreal deltaY = gridRect.height() / (m_tickCount - 1);
54 54 for (int i = 0; i < m_tickCount; ++i) {
55 int y = i * -deltaY + gridRect.bottom();
56 points[i] = y;
55 points[i] = i * -deltaY + gridRect.bottom();
57 56 }
58 57
59 58 return points;
General Comments 0
You need to be logged in to leave comments. Login now