@@ -507,7 +507,8 @@ function createLineClipPath(
507507 lineView : LineView ,
508508 coordSys : Cartesian2D | Polar ,
509509 hasAnimation : boolean ,
510- seriesModel : LineSeriesModel
510+ seriesModel : LineSeriesModel ,
511+ dpr : number
511512) {
512513 if ( isCoordinateSystemType < Cartesian2D > ( coordSys , 'cartesian2d' ) ) {
513514 const endLabelModel = seriesModel . getModel ( 'endLabel' ) ;
@@ -531,7 +532,7 @@ function createLineClipPath(
531532 : null ;
532533
533534 const isHorizontal = coordSys . getBaseAxis ( ) . isHorizontal ( ) ;
534- const clipPath = createGridClipPath ( coordSys , hasAnimation , seriesModel , ( ) => {
535+ const clipPath = createGridClipPath ( coordSys , hasAnimation , seriesModel , dpr , ( ) => {
535536 const endLabel = lineView . _endLabel ;
536537 if ( endLabel && hasAnimation ) {
537538 if ( labelAnimationRecord . originalX != null ) {
@@ -697,6 +698,7 @@ class LineView extends ChartView {
697698 this . _clipShapeForSymbol = clipShapeForSymbol ;
698699 const visualColor = getVisualGradient ( data , coordSys , api )
699700 || data . getVisual ( 'style' ) [ data . getVisual ( 'drawType' ) ] ;
701+ const dpr = api . getDevicePixelRatio ( ) ;
700702 // Initialization animation or coordinate system changed
701703 if (
702704 ! ( polyline && prevCoordSys . type === coordSys . type && step === this . _step )
@@ -742,7 +744,7 @@ class LineView extends ChartView {
742744 }
743745
744746 lineGroup . setClipPath (
745- createLineClipPath ( this , coordSys , true , seriesModel )
747+ createLineClipPath ( this , coordSys , true , seriesModel , dpr )
746748 ) ;
747749 }
748750 else {
@@ -766,14 +768,14 @@ class LineView extends ChartView {
766768 // Update clipPath
767769 const oldClipPath = lineGroup . getClipPath ( ) ;
768770 if ( oldClipPath ) {
769- const newClipPath = createLineClipPath ( this , coordSys , false , seriesModel ) ;
771+ const newClipPath = createLineClipPath ( this , coordSys , false , seriesModel , dpr ) ;
770772 graphic . initProps ( oldClipPath , {
771773 shape : newClipPath . shape
772774 } , seriesModel ) ;
773775 }
774776 else {
775777 lineGroup . setClipPath (
776- createLineClipPath ( this , coordSys , true , seriesModel )
778+ createLineClipPath ( this , coordSys , true , seriesModel , dpr )
777779 ) ;
778780 }
779781
0 commit comments