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/12/25 05:00:53 UTC
[GitHub] [echarts] echarts-bot[bot] commented on issue #16282: [Bug] 5.2.1版本下,环形图series下的data属性的label属性,为数据定制标签功能不生效了,在5.0.2版本还是OK的
echarts-bot[bot] commented on issue #16282:
URL: https://github.com/apache/echarts/issues/16282#issuecomment-1000975432
@fengnian7 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
<details><summary><b>TRANSLATED</b></summary><br>
**TITLE**
[Bug] Under version 5.2.1, the label attribute of the data attribute under the ring chart series, the function of customizing labels for data is not effective, and it is STILL OK in version 5.0.2
**BODY**
### Version
5.2.1
### Link to Minimal Reproduction
_No response_
### Steps to Reproduce
Hello, our usage scenarios are:
The outermost label of the ring chart, and emphasis I set to false, because our use scene does not want him to display, just want to realize the scene of customized text in the center of the ring chart. There is no need to display the label, so our code is as follows, for example:
In version 5.0.2, I set the label in the center of the ring chart like this
option = {
tooltip: {
trigger:'item',
formatter:'{a} <br/>{b}: {c} ({d}%)'
},
legend: {
orient:'vertical',
left: 10,
data: ['Direct Access','Email Marketing','Affiliate Advertising','Video Advertising','Search Engine']
},
series: [
{
name:'Access source',
type:'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
label: {
show: false,
position:'center'
},
emphasis: {
label: {
show: false,
fontSize: '30',
fontWeight:'bold'
}
},
labelLine: {
show: false
},
data: [
{value: 335, name:'Direct access'},
{value: 310, name:'Email marketing'},
{value: 234, name:'Affiliate Ads'},
{value: 135, name:'Video ad'},
{value: 1548, name:'Search Engine'},
{label: {
normal: {
position:'center',
formatter: ['{c| }','{b| center label}', ].join('\n'),
show: true,
rich: {
b: {
color:'#333'
}
}
}
}}
]
}
]
};
Write down the center label directly as "center label", version 5.0.2 can take effect, and the four characters in the middle of the ring graph are displayed normally
But with the same code, under version 5.2.1, this series.date.label is not valid, and these four texts cannot be displayed anymore.
### Current Behavior
After upgrading from version 5.0.2 to version 5.2.1, the text in the middle of the ring chart cannot be displayed
### Expected Behavior
It is expected that version 5.2.1, the text in the center of the ring chart can be displayed
### Environment
```markdown
-OS:
-Browser:
-Framework:
```
### Any additional comments?
_No response_
</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