Skip to content

Commit

Permalink
fix #4764; area animation when y values are high
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed Oct 25, 2024
1 parent 483c471 commit f8cf1c9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/charts/Line.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,10 @@ class Line {
graphics.move(prevX, this.areaBottomY) + graphics.line(prevX, prevY)
}

pathFromLine = graphics.move(0, this.zeroY) + graphics.line(0, this.zeroY)
pathFromArea = graphics.move(0, this.zeroY) + graphics.line(0, this.zeroY)
pathFromLine =
graphics.move(0, this.areaBottomY) + graphics.line(0, this.areaBottomY)
pathFromArea =
graphics.move(0, this.areaBottomY) + graphics.line(0, this.areaBottomY)

if (w.globals.previousPaths.length > 0) {
const pathFrom = this.lineHelpers.checkPreviousPaths({
Expand Down Expand Up @@ -704,8 +706,8 @@ class Line {
this.appendPathFrom &&
!(curve === 'monotoneCubic' && type === 'rangeArea')
) {
pathFromLine += graphics.line(x, this.zeroY)
pathFromArea += graphics.line(x, this.zeroY)
pathFromLine += graphics.line(x, this.areaBottomY)
pathFromArea += graphics.line(x, this.areaBottomY)
}

this.handleNullDataPoints(series, pointsPos, i, j, realIndex)
Expand Down

0 comments on commit f8cf1c9

Please sign in to comment.