如果所示,饼图的比例相加不足100%,有什么解决办法吗
配置项如下
var data=[2,2,9]
option = {
backgroundColor: '#fff',
//title: {
// text: '注册资金',
// subtext: '2016年',
// x: 'center',
// y: 'center',
// textStyle: {
// fontWeight: 'normal',
// fontSize: 16
// }
//},
tooltip: {
show: true,
trigger: 'item',
formatter: "{b}: {c} ({d}%)"
},
legend: {
orient: 'vertical',
right: '5%',
top: '30px',
data: data,
},
series: [
{
type: 'pie',
selectedMode: 'single',
//radius: ['25%', '58%'],
//color: ['#86D560', '#AF89D6', '#59ADF3', '#FF999A'],
label: {
normal: {
position: 'inner',
formatter: '{d}%',
textStyle: {
color: '#fff',
fontWeight: 'bold',
fontSize: 14
}
}
},
labelLine: {
normal: {
show: false
}
},
data: data
},
{
type: 'pie',
radius: ['58%', '83%'],
hoverAnimation: false,
legendHoverLink: false,
itemStyle: {
normal: {
color: '#fff',
opacity: '0'
},
emphasis: {
color: '#fff'
}
},
label: {
normal: {
position: 'inner',
formatter: '{c}人',
textStyle: {
color: '#777777',
fontWeight: 'bold',
fontSize: 14
}
}
},
data: data
}
]
};