diff --git a/src/chart/line/LineView.js b/src/chart/line/LineView.js index 49362e0d43..d45ed44f84 100644 --- a/src/chart/line/LineView.js +++ b/src/chart/line/LineView.js @@ -369,6 +369,7 @@ export default ChartView.extend({ clipShapeForSymbol.r1 += 0.5; } } + this._clipShapeForSymbol = clipShapeForSymbol; // Initialization animation or coordinate system changed if ( !(polyline && prevCoordSys.type === coordSys.type && step === this._step) @@ -524,6 +525,10 @@ export default ChartView.extend({ // Null data return; } + // fix #11360: should't draw symbol outside clipShapeForSymbol + if (this._clipShapeForSymbol && !this._clipShapeForSymbol.contain(pt[0], pt[1])) { + return; + } symbol = new SymbolClz(data, dataIndex); symbol.position = pt; symbol.setZ( diff --git a/test/clip.html b/test/clip.html index 0a2ad60643..b4e1d6d2ac 100644 --- a/test/clip.html +++ b/test/clip.html @@ -1330,5 +1330,66 @@ }); }); + + + +
+ +