Skip to content

Commit

Permalink
Fix issue 4630: a regression bug introduced by commit 686266c (3.49.0)
Browse files Browse the repository at this point in the history
Reduce the calculation of zeroH.
  • Loading branch information
rosco54 committed Aug 14, 2024
1 parent cad1d2f commit df170c8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/charts/BarStacked.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit df170c8

Please sign in to comment.