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

[GitHub] [incubator-echarts] dengzengjian opened a new issue #10217: 4.0版本以后,绘制半圆的南丁格尔图的 数据value为0的时候无法隐藏label和labelline,

dengzengjian opened a new issue #10217: 4.0版本以后,绘制半圆的南丁格尔图的 数据value为0的时候无法隐藏label和labelline,
URL: https://github.com/apache/incubator-echarts/issues/10217
 
 
   在gallery中即3.8.0版本 运行是正常的,在4.0版本以后有多余的label线和label,设置了minShowLabelAngle 为true 也无效
   代码如下:
   this.chart.setOption({
           // backgroundColor: "rgb(43, 51, 59)",
           toolbox: {
             show: false,
             feature: {
               mark: {
                 show: true
               },
               dataView: {
                 show: true,
                 readOnly: false
               },
               magicType: {
                 show: true,
                 type: ["pie", "funnel"]
               },
               restore: {
                 show: true
               },
               saveAsImage: {
                 show: true
               }
             }
           },
           calculable: true,
           tooltip: {
             trigger: "item",
             formatter: "{a}<br/>{b}:{c}个"
           },
           title: {
             // text: "受纳场项目统计",
             left: "center",
             top: 10,
             textStyle: {
               color: "#ccc"
             }
           },
           calculable: true,
           legend: {
             // icon: "circle",
             x: "center",
             y: "15%",
             data: ["在建", "已完工", "为规划", "已规划"],
             textStyle: {
               color: "#fff"
             }
           },
           series: [
             {
               name: "受纳场项目",
               type: "pie",
               radius: [17, 85],
               avoidLabelOverlap: false,
               stillShowZeroSum:true,
               startAngle: 0,
               // radius:'55%',绘制半圆
               center: ["50.0%", "38%"],
               roseType: "area",
               selectedMode: "single",
               label: {
                 normal: {
                   show: true,
                   formatter: "{c}个"
                 },
                 emphasis: {
                   show: true
                 }
               },
               labelLine: {
                 normal: {
                   show: true,
                   smooth: false,
                   length: 20,
                   length2: 10
                 },
                 emphasis: {
                   show: true
                 }
               },
               data: [
                 {
                   value: 600.58,
                   name: "已完工",
                   itemStyle: {
                     normal: {
                       color: "#FFD900"
                     }
                   }
                 },
                 {
                   value: 1100.58,
                   name: "在建",
                   itemStyle: {
                     normal: {
                       color: "#24C768"
                     }
                   }
                 },
                 {
                   value: 1200.58,
                   name: "未规划",
                   itemStyle: {
                     borderWidth:0,
                     normal: {
                       color: "#FF7E00"
                     }
                   }
                 },
                 {
                   value: 1300.58,
                   name: "已规划",
                   itemStyle: {
                     normal: {
                       color: "#00A1E4"
                     }
                   }
                 },
                 {
                   value: 0,
                   name: "",
                   itemStyle: {
                     opacity: 0,
                     normal: {
                       label: {
                         show: false
                       },
                       labelLine: {
                         show: false
                       }
                     }
                   }
                 },
                 {
                   value: 0,
                   name: "",
                   itemStyle: {
                     normal: {
                       label: {
                         show: false
                       },
                       labelLine: {
                         show: false
                       }
                     }
                   }
                 },
                 {
                   value: 0,
                   name: "",
                   itemStyle: {
                     normal: {
                       label: {
                         show: false
                       },
                       labelLine: {
                         show: false
                       }
                     }
                   }
                 },
                 {
                   value: 0,
                   name: "",
                   itemStyle: {
                     normal: {
                       label: {
                         show: false
                       },
                       labelLine: {
                         show: false
                       }
                     }
                   }
                 }
                 /* {
                   value: 0,
                   name: "",
                   itemStyle: {
                     normal: {
                       label: {
                         show: false
                       },
                       labelLine: {
                         show: false
                       }
                     }
                   }
                 },
                 {
                   value: 0,
                   name: "",
                   itemStyle: {
                     normal: {
                       label: {
                         show: false
                       },
                       labelLine: {
                         show: false
                       }
                     }
                   }
                 } */
               ]
             }
           ]
         });
   ![1554369766(1)](https://user-images.githubusercontent.com/21662617/55544748-4fae0f80-56fe-11e9-8f3a-7dc06c01ab2b.jpg)
   

----------------------------------------------------------------
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


With regards,
Apache Git Services

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