You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "LemonCandyi (via GitHub)" <gi...@apache.org> on 2023/05/12 09:03:51 UTC

[GitHub] [echarts] LemonCandyi opened a new issue, #18619: [Bug] The text displayed by label.normal in the pie chart overlaps with the text displayed when pointing to a slice.

LemonCandyi opened a new issue, #18619:
URL: https://github.com/apache/echarts/issues/18619

   ### Version
   
   5.4.2
   
   ### Link to Minimal Reproduction
   
   none
   
   ### Steps to Reproduce
   
   When using a pie chart, I added both label.normal and emphasis to display labels in the center. However, there is an issue where the label.normal text overlaps with the highlighted text when pointing to areas with less proportion, while it works fine when pointing to the area with the highest proportion.
   Here is my configuration.
   option = {
         legend: {
           top: '5%',
           left: 'center'
         },
         series: [{
           name: '',
           type: 'pie',
           radius: ['50%', '70%'], 
           avoidLabelOverlap: false,
           tooltip: {
             show: false
           },
           label: {
             show: true,
             position: 'center',
             normal: {
               show: true,
               position: 'center',
               color: '#4c4a4a',
               formatter: '1000'+ '\n\r' + '今日入园人数',
               
             },
           },
           emphasis: {
             label: {
               show: true,
               formatter: '{b}: {d}%',
               fontSize: 20,
               fontWeight: 'bold'
             }
           },
           labelLine: {
             show: false
           },
           data: [{
               value: 500,
               name: '员工'
             },
             {
               value: 250,
               name: '访客'
             },
             {
               value: 250,
               name: '施工人员'
             }
           ]
         }]
       };
   
   ### Current Behavior
   
   none
   
   ### Expected Behavior
   
   none
   
   ### Environment
   
   ```markdown
   - OS: windows11
   - Browser:chrome 112.0.5615.140
   - Framework: Vue@2
   ```
   
   
   ### Any additional comments?
   
   _No response_


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


[GitHub] [echarts] helgasoft commented on issue #18619: [Bug] The text displayed by label.normal in the pie chart overlaps with the text displayed when pointing to a slice.

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #18619:
URL: https://github.com/apache/echarts/issues/18619#issuecomment-1546120808

   one solution is to add some CRs to the _emphasis.label.formatter_
   ```formatter: '\n\n\n{b}: {d}%'```
   
   But it is better to use _title_ instead of _series.label_ for the center. 
   ```
     series: [{ label: {show: false}   ......
     title: {
       text: '1000'+ '\n' + '今日入园人数', 
       top:'middle', left:'center',
       textStyle: {fontSize: 12, fontWeight: 'normal'}
     },
   ```


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