echart 怎么定制成如图的样式?

现在有一个需求要定制成这样,
clipboard.png

我对着官网文档看了好久..还是只能做成这样
现在的问题是,
1.中间的那个大总数文字统计,
2.还有label上的字数统计,
3.label的小圆点
怎么能弄出来?

clipboard.png

下面是我的代码:

app.title = '环形图';

option = {


 title: { 
    text: '年龄情况',
    left: 'center',
    bottom: 20,
    textStyle: {
        color: 'rgb(57,57,56)'
    }
},
tooltip: {
    trigger: 'item',
    formatter: "{a} <br/>{b}: {c} ({d}%)"
},

series: [
    {
        name:'访问来源',
        type:'pie',
        radius: ['50%', '70%'],
        avoidLabelOverlap: false,
        
        
        label: {
            normal: {
                show: true,
                textStyle: {
                    color: 'rgb(104,104,104)'
                }
            },
            emphasis: {
                show: true,
                textStyle: {
                    fontSize: '30',
                    fontWeight: 'bold'
                }
            }
        },
        labelLine: {
            normal: {
                show: true,
            }
        },
        
        
        data:[
            
            {value:8, name:'46至55岁'},
            {value:13, name:'其他'},
            {value:30, name:'56岁及以上'}
            
        ]
    }
]

};

阅读 3.8k
3 个回答

中间的大字可以用title,位置xy都是center
label可以用formatterrich两行不同样式
label富文本

label 富文本里面有个formatter可以写dom 加class名,想怎么玩怎么玩

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题