seriesData: [
{
type: ‘pie’,
// radius: [60, 90],
center: [‘50%’, ‘50%’],
label: {
normal: {
show: true,
position:‘inner’
},
emphasis: {
show: true
}
},
itemStyle: {
emphasis: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: ‘rgba(0, 0, 0, 0.5)’
},
normal:{// 设置扇形的阴影shadowBlur: 30,shadowColor: 'rgba(255,227,42,0.3)', shadowOffsetX: -5,shadowOffsetY: 5,color: function(params) {var colorList = [{c1: ' #6F59FF', //c2: '#A582FF' },{c1: ' #F2054D', //c2: '#B94D6F'},{c1: '#24DE15',//c2: '#508B4B'},{c1: '#05749D',//c2: '#46646F'},{c1: '#DBF00F',//c2: '#D8E07E'},]return new echarts.graphic.LinearGradient(1, 0, 0, 0, [// //自定义颜色有渐变效果{ //颜色渐变函数 前四个参数分别表示四个位置依次为左、下、右、上offset: 0,color: colorList[params.dataIndex].c1}, {offset: 1,color: colorList[params.dataIndex].c2},])/* return colorList[params.dataIndex]*/}// color:function(params) {// //自定义颜色无渐变效果// var colorList = [// 'green', '#005eea', '#00bb96','#FEB64D','#00bb96',// ];// return colorList[params.dataIndex]// }}},lableLine: {normal: {show: true},emphasis: {show: true}},data: [{ value: 20, name: '供电公司' },{ value: 30, name: '上海通号' },{ value: 20, name: '机电公司' },{ value: 12, name: '冠华瑞和' },{ value: 18, name: '亚太安迅' },]}]