100pah edited a comment on issue #11889: 当环形图偏移时,graphic自定义文字无法居中的问题
URL: 
https://github.com/apache/incubator-echarts/issues/11889#issuecomment-568558396
 
 
   That is not a bug. `left` means the distance between the left boundary of 
the element to the left boundary of the echarts.
   
   But indeed it is hard to locate an element aligning with a component located 
via `center` (like `pie`, `polar`, `sunburst`).
   Perhaps we need to provide some new approaches to locate. For example, 
provide an `center` prop:
   ```js
   graphic: [{
         type: 'text',
         center: ['35%', null], // null means only set x center but leave y 
center not set
         style: {
             text: 'asdfasdfasd'
         } 
   }]
   ``` 
   
   or 
   ```js
   graphic: [{
         type: 'text',
         left: '35%c',
         style: {
             text: 'asdfasdfasd'
         } 
   }]
   ```

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to