From df170c83f818f918cbd77db6207f01cc77509b7f Mon Sep 17 00:00:00 2001 From: Ross Johnson <159597299+rosco54@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:43:19 +1000 Subject: [PATCH] Fix issue 4630: a regression bug introduced by commit 686266c (3.49.0) Reduce the calculation of zeroH. --- src/charts/BarStacked.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/charts/BarStacked.js b/src/charts/BarStacked.js index e5fdf65ea..b6ba8c55f 100644 --- a/src/charts/BarStacked.js +++ b/src/charts/BarStacked.js @@ -255,10 +255,11 @@ class BarStacked extends Bar { barWidth *= parseInt(userColumnWidth, 10) / 100 } - zeroH = - w.globals.gridHeight - - this.baseLineY[translationsIndex] - - (this.isReversed ? w.globals.gridHeight : 0) + if (this.isReversed) { + zeroH = this.baseLineY[translationsIndex] + } else { + zeroH = w.globals.gridHeight - this.baseLineY[translationsIndex] + } // initial x position is the left-most edge of the first bar relative to // the left-most side of the grid area.