饼图在负数情况下出现斜线
配置项如下
var option = {
series: [{
color:["#02A9ED","#DCDCDC"],
name: '访问来源',
type: 'pie',
radius: ['80%', '85%'],
avoidLabelOverlap: false,
label: {
normal: {
show: true,
position: 'center'
}
},
labelLine: {
normal: {
show: false
}
},
data: [{
value: '-10',
name: '75%',
label: {
normal: {
formatter:function(param){
return param.value
},
textStyle: {
fontSize: '20',
color:'#0A5BDE',
fontWeight: 'bold'
}
}
},
itemStyle:{
normal:{
color:'#0A5BDE'
}
}
},
{
value: '50',
name: '同期',
label: {
normal: {
show:false,
}
},
itemStyle:{
normal:{
color:'#02A9ED'
}
}
}
]
}]
};