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/11/26 07:05:46 UTC

[GitHub] [echarts] plainheart commented on issue #16117: Zero sum pie chart

plainheart commented on issue #16117:
URL: https://github.com/apache/echarts/issues/16117#issuecomment-979740084


   FYI, you can try the following way. I'm not sure if it meets your requirement.
   It takes an extra empty pie series so it needs no calculation and won't change legend color.
   
   <details>
   <summary>Code</summary>
   
   ```js
   option = {
     tooltip: {
       trigger: 'item'
     },
     legend: {
       top: '5%',
       left: 'center'
     },
     series: [
       {
         type: 'pie',
         radius: ['40%', '70%'],
         label: {
           show: false
         },
         itemStyle: {
           color: '#eee'
         },
         silent: true,
         z: -1,
         animation: false
       },
       {
         name: 'Access From',
         type: 'pie',
         radius: ['40%', '70%'],
         avoidLabelOverlap: false,
         label: {
           show: false,
           position: 'center'
         },
         stillShowZeroSum: false,
         showEmptyCircle: false,
         emphasis: {
           label: {
             show: true,
             fontSize: '40',
             fontWeight: 'bold'
           }
         },
         labelLine: {
           show: false
         },
         data: [
           { value: 0, name: 'Search Engine (0)' },
           { value: 0, name: 'Direct (0)' }
         ]
       }
     ]
   };
   ```
   
   </details>
   


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

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

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