【echarts样例】环形图

代码:

option = {
    color:["#fff","#ccc"],
    grid:{
        show:true,
        backgroundColor:"#2EBEFA"
    },
    title: {
        text: '良好',
        subtext: 'xx状况',
        x: 'center',
        y: 'center',
        textStyle : {
            color : '#fff',
            fontSize : 35
        },
        subtextStyle: {
          color: '#fff',
          fontSize: 20,
        }
    },
    series: [
        {
            name:'xx状况',
            type:'pie',
            radius: ['60%', '70%'],
            avoidLabelOverlap: false,
            hoverAnimation: false, //移动放大
            clockwise: false, //逆时针
            labelLine: {
                normal: {
                    show: false
                }
            },
            label:{
                normal:{
                    show:false
                }
            },
            // itemStyle : labelFromatter,
            data:[{
                    value:88,
                    name:"良好"
                },
                {
                    value:12,
                    name:"other",
                     itemStyle : {
                         normal : {
                            color: 'rgba(255,255,255, 0.3)'
                         }
                     }
                }
                
            ]
        }
    ]
};

效果:


猜你喜欢

转载自blog.csdn.net/hao_0420/article/details/81010341
今日推荐