series: [ { name: "完成率", type: "pie", radius: ["60%", "87%"], avoidLabelOverlap: false, itemStyle :{ normal : { label : { show : true, position : 'center', formatter : this.correctRate + "%", textStyle : { color : '#3D414B', fontSize : '30', fontFamily : '微软雅黑', fontWeight : 'bold' } }, labelLine : { show : false } } }, data: [ { value: 100-this.correctRate, name: "未完成" }, { value: this.correctRate, name: "完成", itemStyle: { normal: {//颜色渐变 color: new echarts.graphic.LinearGradient( 0, 0, 0, 1, [ {offset: 0, color: '#0095FF'}, {offset: 0.5, color: '#0CB9FF'}, {offset: 1, color: '#0095FF'} ] ) } } } ] } ],
效果图如下: