diff --git a/src/chart/line/LineView.ts b/src/chart/line/LineView.ts index 9cabed1302..6103b32802 100644 --- a/src/chart/line/LineView.ts +++ b/src/chart/line/LineView.ts @@ -691,9 +691,18 @@ class LineView extends ChartView { } // Update clipPath - lineGroup.setClipPath( - createLineClipPath(this, coordSys, false, seriesModel) - ); + const oldClipPath = lineGroup.getClipPath(); + if (oldClipPath) { + const newClipPath = createLineClipPath(this, coordSys, false, seriesModel); + graphic.initProps(oldClipPath, { + shape: newClipPath.shape + }, seriesModel); + } + else { + lineGroup.setClipPath( + createLineClipPath(this, coordSys, true, seriesModel) + ); + } // Always update, or it is wrong in the case turning on legend // because points are not changed diff --git a/test/line-animation.html b/test/line-animation.html index 011fd69d83..853e3b8154 100644 --- a/test/line-animation.html +++ b/test/line-animation.html @@ -49,6 +49,8 @@ } +
+ @@ -400,6 +402,42 @@