daisybaicai opened a new issue #15055:
URL: https://github.com/apache/echarts/issues/15055
### Version
5.1.1
### Steps to reproduce
```
const data = [
{value:625000, name:'直接访问'},
{value:88000, name:'邮件营销'},
{value:0, name:'联盟广告'},
{value:-712751, name:'视频广告'},
];
option = {
title : {
text: '某站点用户访问来源',
subtext: '纯属虚构',
x:'center'
},
tooltip : {
trigger: 'item',
formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {
orient : 'vertical',
x : 'left',
data:['直接访问','邮件营销','联盟广告','视频广告'],
formatter: function(name) {
var target
for (var i = 0, l = data.length; i < l; i ) {
if (data[i].name === name) {
target = data[i].value
}
}
var arr = [`{a|${name}}{b|${target}}{c|万TEU}`]
return arr.join('\n')
},
},
toolbox: {
show : true,
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
magicType : {
show: true,
type: ['pie', 'funnel'],
option: {
funnel: {
x: '25%',
width: '50%',
funnelAlign: 'left',
max: 1548
}
}
},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
series : [
{
name:'访问来源',
type:'pie',
radius : '55%',
center: ['50%', '60%'],
data:[
{value:625000, name:'直接访问'},
{value:88000, name:'邮件营销'},
{value:0, name:'联盟广告'},
{value:-712751, name:'视频广告'},
]
}
]
};
```
### What is expected?
希望负数在饼图上不显示,但是左侧的legend还是显示数值
### What is actually happening?
但饼图中负数会因为太大,直接覆盖掉了其他的数值
<!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
<!-- This issue is in English. DO NOT REMOVE -->
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]