Skip to content

Commit

Permalink
improve barWidth/barHeight calc
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Mar 7, 2023
1 parent ee6b9d9 commit 050546e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/charts/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ class Bar {
x,
y,
series,
barHeight,
barWidth,
barHeight: paths.barHeight ? paths.barHeight : barHeight,
barWidth: paths.barWidth ? paths.barWidth : barWidth,
elDataLabelsWrap,
elGoalsMarkers,
visibleSeries: this.visibleI,
Expand Down Expand Up @@ -432,7 +432,8 @@ class Bar {
x,
y,
goalX: this.barHelpers.getGoalValues('x', zeroW, null, i, j),
barYPosition
barYPosition,
barHeight
}
}

Expand Down Expand Up @@ -484,6 +485,8 @@ class Bar {
barWidth = (this.seriesLen * barWidth) / nonZeroColumns
barXPosition = x + barWidth * this.visibleI
barXPosition -= barWidth * zeroEncounters
} else {
barXPosition = x + barWidth * this.visibleI
}
}

Expand Down Expand Up @@ -521,7 +524,8 @@ class Bar {
x,
y,
goalY: this.barHelpers.getGoalValues('y', null, zeroH, i, j),
barXPosition
barXPosition,
barWidth
}
}

Expand Down

0 comments on commit 050546e

Please sign in to comment.