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 2019/12/23 19:24:44 UTC
[GitHub] [incubator-echarts] 100pah edited a comment on issue #11889: 当环形图偏移时,graphic自定义文字无法居中的问题
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org