效果图:
let option = {
tooltip: {
trigger: 'item',
formatter: '{a}
{b}: {c} ({d}%)'
},
series: [
{
name: '数据',
type: 'pie',
selectedMode: 'single',
radius: ['10%', '20%'],
label: {
position: 'inner'
},
itemStyle:{
borderWidth:1, //设置border宽度
borderColor:'#fff',
},
labelLine: {
show: false
},
color: ['#f2bd4b', '#f87d76', '#4bddc8'],
data: [
{value: 100, name: 'a'},
{value: 200, name: 'b'},
{value: 400, name: 'c'}
]
},
{
name: '数据',
type: 'pie',
radius: ['20%', '30%'],
label: {
position: 'inner'
},
color: ['#f2bd4b', '#f2bd4b', '#f87d76', '#f87d76', '#4bddc8', '#4bddc8', '#4bddc8', '#4bddc8'],
itemStyle:{
borderWidth:1,
borderColor:'#fff',
},
data: [
{value: 50, name: 'a1'},
{value: 50, name: 'a2'},
{value: 100, name: 'b1'},
{value: 100, name: 'b2'},
{value: 100, name: 'c1'},
{value: 100, name: 'c2'},
{value: 100, name: 'c3'},
{value: 100, name: 'c4'}
]
}
]
};