echarts环形图配置

option = {
color: [
new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{offset:1, color: ‘#188df0’},
// {offset: 0.5, color:’#188df0’},
{offset: 0,color: ‘#83bff6’}]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [
{offset: 1, color: ‘#83bff6’},
//{offset: 0.5, color: ‘#188df0’},
{offset: 0, color: ‘#188df0’}]),
new echarts.graphic.LinearGradient(1, 0, 0, 0, [
{offset: 1,color: ‘#188df0’},
// {offset: 0.5,color: ‘#188df0’},
{offset: 0,color: ‘#83bff6’}
])
],
title : {
text: ‘某站点用户访问来源’,
x:‘left’,
textStyle: {
color: ‘#333333’,
fontWeight: ‘bold’,
fontSize: 13
}

},
tooltip : {
    trigger: 'item',
    formatter: "{a} <br/>{b} : {c} ({d}%)"
},
legend: {   
    orient: 'vertical',
icon:'circle',
x : '80%',
y : '60%',
itemWidth:50,
itemHeight:30,
textStyle:{
	color:'#8C8C8C'
},
    data:['直接访问','邮件营销','联盟广告']
},
toolbox: {
    show : false,
    feature : {
        magicType : {
            show: true, 
            type: ['pie'],
        },
    }
},

series : [
    {
      name:'访问来源',
      center:['40%','50%'],
      label: {
       labelLine: {
            normal: {
                 position: 'inner',
                 show : false
                },             
            lineStyle: {
                    color: '#333'
                }
            }        
        },
        type:'pie',
        radius: ['35%', '55%'],
        data:[
            {value:335, name:'直接访问'},
            {value:310, name:'邮件营销'},
            {value:234, name:'联盟广告'}
        ]
    }
]

};


版权声明:本文为CSDN18202250010原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。