Bootstrap

Echarts饼图中间文字信息设置

option = {

    legend: {
        orient: 'vertical',
        left: 10,
        data: ['直接访问', '邮件营销', '联盟广告', '视频广告', '搜索引擎']
    },
    graphic:{
        type:"text",
        left:"center",
        top:"40%",
        style:{
            text:"运动达标率",
            textAlign:"center",
            fill:"#333",
            fontSize:20,
            fontWeight:700
        }
    },
    title:{
        text:"80%",
        left:"center",
        top:"50%",
        textStyle:{
            color:"#27D9C8",
            fontSize:36,
            align:"center"
        }
    },
    series: [
        {
            name: '访问来源',
            type: 'pie',
            radius: ['50%', '70%'],
            avoidLabelOverlap: false,
            label: {
                show: false,
                position: 'center'
            },
            emphasis: {
                label: {
                    show: false,
                    fontSize: '30',
                    fontWeight: 'bold'
                }
            },
            labelLine: {
                show: false
            },
            data: [
                {value: 335, name: '直接访问'},
                {value: 310, name: '邮件营销'},
                {value: 234, name: '联盟广告'},
                {value: 135, name: '视频广告'},
                {value: 1548, name: '搜索引擎'}
            ]
        }
    ]
};

 

效果

 

设置  graphic及title 属性,如上代码

 

 

 

 

;