2D: Fix stale axis displacement after zoom


Previously, when axis zoom was updated, it didn't update the axis
displacement. This was due to axis stepPx updating after the
displacement calculation. Displacement calculation depends on stepPx.
Because stepPx was updated after the displacement, the displacement
always used the previous stepPx value. Hence, the fix pan the graph a
little.

This patch moves the displacement calculation to happen in
AxisRenderer::updateAxis right after the stepPx calculation.

Pick-to: 6.12
Fixes: QTBUG-150068
Change-Id: I9763e787fe59d6585e27ce9f4b6a99b7178d6376
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Owais Akhtar <owais.akhtar@qt.io>
commit5a2b3e9e2d6e7dd60e5313a8055685d30e1d7411
parenta6561a16fea885fd3a56c1793209d462a073c226
authorSami Varanka <sami.varanka@qt.io>
committerSami Varanka <sami.varanka@qt.io>
commit timeTue, 22 Sep 2026 08:05:05 +0000