Skip to content

Commit

Permalink
fix(line): fix area rendering (#2558)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatinAniss authored Apr 29, 2024
1 parent 6996fc1 commit 3f090bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/line/src/LineCanvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ const LineCanvas = props => {
ctx.globalAlpha = areaOpacity

areaGenerator.context(ctx)
series.forEach(serie => {
ctx.fillStyle = serie.color
for (let i = series.length - 1; i >= 0; i--) {
ctx.fillStyle = series[i].color
ctx.beginPath()
areaGenerator(serie.data.map(d => d.position))
areaGenerator(series[i].data.map(d => d.position))
ctx.fill()
})
}

ctx.restore()
}
Expand Down

0 comments on commit 3f090bc

Please sign in to comment.