var BlueCollar = 20, whiteCollar = 80; var option = { tooltip : { trigger: 'item', formatter: "{a} <br/> <span style='display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:#ffe325'></span> {b}: {d}%" }, legend: { orient: 'vertical', left: 'left', top: '30', data: ['蓝领','白领'] }, series : [{ name: '蓝领/白领比例', type: 'pie', radius : ['30%', '75%'],//圆的内外半径 center: ['50%', '50%'],//圆的X,Y轴平移 data:[ { value: BlueCollar, name: '蓝领', itemStyle:{//柱子颜色 normal:{color:'#00b8ee'} } }, { value: whiteCollar, name: '白领', itemStyle:{//柱子颜色 normal:{color:'#fe9e25'} } } ], itemStyle: { emphasis: { shadowBlur: 10, shadowOffsetX: 0, shadowColor: 'rgba(0, 0, 0, 0.5)' } } }], animationDelay: function (idx) { return idx * 10; }, animationType : 'elasticOut', animationEasing: 'elasticOut' }