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 2018/05/24 00:59:08 UTC

[GitHub] cxytomo opened a new issue #8390: 饼图数据项过多时,指示线超出绘图区域

cxytomo opened a new issue #8390: 饼图数据项过多时,指示线超出绘图区域
URL: https://github.com/apache/incubator-echarts/issues/8390
 
 
   ### One-line summary [问题简述]
   饼图数据项过多时,指示线超出绘图区域
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]:3.8.4
   + Browser version [浏览器类型和版本]:都存在
   + OS Version [操作系统类型和版本]:都存在
   
   ### Expected behaviour [期望结果]
   指示线全部包含在绘图区域内
   
   ### ECharts option [ECharts配置项]
   ```javascript
   option = {
               tooltip: {
                   trigger: 'item',
                   //访问来源
                   //ip:数量(百分比)
                   backgroundColor: 'rgba(15, 25, 53, 0.8)',
                   borderColor: 'rgba(15, 25, 53, 0.8)',
                   formatter: function(params) {
                       var _html = '';
                       _html += '<div class="tooltip-wrapper controller-1"><h3 class="tooltip-title">' + params.name + '</h3>';
                       _html += '<div class="tooltip-cont">防护次数占比:' + params.percent + '%</div>';
                       _html += '<div class="tooltip-cont">防护次数:' + thousandBitSeparator(params.value) + '次</div>';
                       _html += '</div>';
                       return _html;
                   }
               },
               color: ['#BB312B','#FF7336','#B5DE56','#E7A541','#ABD2FA','#9489E0','#30AEF0','#1676A8','#4598E3','#53E0EA'],
               legend: {
                   show: false
               },
               grid: {
                   top: '4%',
                   bottom: '0',
                   containLabel: true
               },
               series: [{
                   name: '',
                   type: 'pie',
                   center : [ '50%', '180' ],
                   //startAngle: 0,
                   labelLine: {
                       normal: {
                           length: 0,
                           length2: 20,
                           lineStyle: {
                               color: '#fff'
                           }
                       }
                   },
                   itemStyle: {
                       normal: {
                           opacity: 0.8
                       },
                       emphasis: {
                           opacity: 1
                       }
                   },
                   label: {
                       normal: {
                           color: '#fff'
                       }
                   },
                   data: [{
           "percent": "86.49%",
           "name": "业务音乐",
           "value": 65
       }, {
           "name": "业务数媒",
           "percent": "81.08%",
           "value": 40
       }, {
           "percent": "13.51%",
           "name": "业务动漫",
           "value": 4
       }, {
           "name": "业务视讯",
           "percent": "0.00%",
           "value": 1
       }, {
           "value": 2,
           "name": "**院",
           "percent": "0.00%"
       }, {
           "value": 0.5,
           "name": "验收测试",
           "percent": "0.00%"
       }, {
           "name": "验收测试2",
           "percent": "0.00%",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "业务互娱",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "name": "业务视讯",
           "percent": "0.00%",
           "value": 0
       }, {
           "value": 0,
           "name": "杭研院",
           "percent": "0.00%"
       }, {
           "value": 0,
           "name": "验收测试",
           "percent": "0.00%"
       }, {
           "name": "验收测试2",
           "percent": "0.00%",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "业务互娱",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }, {
           "percent": "0.00%",
           "name": "互联网业务基地",
           "value": 0
       }]
               }]
           };
   ```
   
   ### Other comments [其他信息]
   ##示例截图
   ![default](https://user-images.githubusercontent.com/2089688/40458821-99953a2c-5f30-11e8-9735-1c2c1bc9eaf5.png)
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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