mirror of
https://github.com/fralx/LimeReport.git
synced 2025-10-01 11:31:10 +03:00
Fix drawing vertical lines in grid chart
This commit is contained in:
@@ -21,14 +21,21 @@ void GridLinesChart::paintChart(QPainter *painter, QRectF chartRect)
|
||||
)
|
||||
);
|
||||
const qreal barsShift = calcRect.height();
|
||||
const qreal topOffset = painter->fontMetrics().height() * (m_chartItem->horizontalAxisOnTop() ? 1 : -1);
|
||||
const QRectF gridRect = chartRect.adjusted(
|
||||
const qreal topOffset = painter->fontMetrics().height();
|
||||
QRectF gridRect = chartRect.adjusted(
|
||||
hPadding,
|
||||
vPadding + valuesVMargin + topOffset,
|
||||
-hPadding * 3,
|
||||
-(vPadding + barsShift)
|
||||
);
|
||||
|
||||
if (!m_chartItem->horizontalAxisOnTop()) {
|
||||
// Draw labels above the grid
|
||||
const qreal height = calcRect.height();
|
||||
calcRect.setBottom(gridRect.top());
|
||||
calcRect.setTop(calcRect.bottom() - height);
|
||||
}
|
||||
|
||||
paintGrid(painter, gridRect);
|
||||
|
||||
paintSerialLines(
|
||||
|
Reference in New Issue
Block a user