statistics: fix placement of horizontal labels in bar charts

The subtraction of half the label width, needed for centered
labels, must have been lost somewhere.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2021-02-07 17:46:47 +01:00 committed by Dirk Hohndel
parent 5b6f468547
commit 60a6b61fb6

View file

@ -151,6 +151,7 @@ void BarSeries::BarLabel::updatePosition(bool horizontal, bool center, const QRe
setVisible(false);
return;
}
pos.rx() -= itemSize.width() / 2.0;
}
item->setPos(roundPos(pos)); // Round to integer to avoid ugly artifacts.
}