You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2021/04/20 04:04:20 UTC

[GitHub] [echarts] pissang commented on a change in pull request #14702: fix(pie): hide labelLine emphasis when inside

pissang commented on a change in pull request #14702:
URL: https://github.com/apache/echarts/pull/14702#discussion_r616327385



##########
File path: src/chart/pie/PieView.ts
##########
@@ -193,7 +193,7 @@ class PiePiece extends graphic.Sector {
 
         const labelPosition = seriesModel.get(['label', 'position']);
         if (labelPosition !== 'outside' && labelPosition !== 'outer') {
-            sector.getTextGuideLine()?.hide();
+            sector.removeTextGuideLine();
             return;
         }

Review comment:
       Seems the guideline can't be restored if the position is changed from 'inside' to 'outside' again. Perhaps we need to recreate the guideline here instead of in https://github.com/apache/echarts/blob/2c88dec314fb8260c6957341df174da8cdb9daea/src/chart/pie/PieView.ts#L49
   ```ts
   if (..)  { ... }
   else {
     let polyline = this.getTextGuideLine();
     if (!polyline) {
       polyline = new graphic.Polyline();
       this.setTextGuideLine(polyline);
     }
     // Default use item visual color
      setLabelLineStyle(this, getLabelLineStatesModels(itemModel), {
          stroke: visualColor,
          opacity: retrieve3(labelLineModel.get(['lineStyle', 'opacity']), visualOpacity, 1)
       });
   }
   ```
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org