圈内字体,样式不同,怎么来实现?
配置项如下
option = {
series: [{
name: '税额比例',
type: 'pie',
radius: ['40%', '55%'],
avoidLabelOverlap: false,
label: {
normal: {
show: false,
position: 'center',
textStyle: {
fontSize: 12
}
},
emphasis: {
show: true,
formatter: function(param) {
return param.percent.toFixed(0) + '%';
},
textStyle: {
fontSize: '30',
fontWeight: 'bold'
}
}
},
data: [{
value: 222,
name: 'AA五星级酒店^AA',
label: {
emphasis: {
show: true,
formatter: function(param) {
return param.percent.toFixed(0) + '%\n' + param.name.split('^')[0];
},
textStyle: {
fontSize: 12,
color: '#333333'
}
}
}
},{
value: 333,
name: 'CC五星级酒店^CC',
label: {
emphasis: {
show: true,
formatter: function(param) {
return param.percent.toFixed(0) + '%\n' + param.name.split('^')[0];
},
textStyle: {
fontSize: 12,
color: '#333333'
}
}
}
},{
value: 444,
name: 'QQ五星级酒店^QQ',
label: {
emphasis: {
show: true,
formatter: function(param) {
return param.percent.toFixed(0) + '%\n' + param.name.split('^')[0];
},
textStyle: {
fontSize: 12,
color: '#333333'
}
}
}
}]
}, {
name: '税额比例外面',
type: 'pie',
radius: ['55%', '55%'],
label: {
normal: {
show: true,
formatter: '{b}',
position: 'outside',
textStyle: {
fontSize: 12
}
}
},
labelLine: {
normal: {
show: false,
},
},
data: [{
value: 222,
name: 'AA',
label: {
normal: {
show: true,
formatter: '{b}',
textStyle: {
fontSize: 12,
color: '#333333',
}
}
}
},{
value: 333,
name: 'CC',
label: {
normal: {
show: true,
formatter: '{b}',
textStyle: {
fontSize: 12,
color: '#333333',
}
}
}
},{
value: 444,
name: 'QQ',
label: {
normal: {
show: true,
formatter: '{b}',
textStyle: {
fontSize: 12,
color: '#333333',
}
}
}
}]
}],
animation: false
};