Skip to content

Commit

Permalink
NaN bug in bars with rounded corners - fixes #3615
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Feb 4, 2023
1 parent cc70384 commit 9b01e31
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/charts/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -440,10 +440,11 @@ class Bar {
if (!w.globals.seriesX[realIndex].length) {
sxI = w.globals.maxValsInArrayIndex
}

x =
(w.globals.seriesX[sxI][j] - w.globals.minX) / this.xRatio -
(barWidth * this.seriesLen) / 2
if (w.globals.seriesX[sxI][j]) {
x =
(w.globals.seriesX[sxI][j] - w.globals.minX) / this.xRatio -
(barWidth * this.seriesLen) / 2
}
}

let barXPosition = x + barWidth * this.visibleI
Expand Down

0 comments on commit 9b01e31

Please sign in to comment.