【echarts樣例】環形圖
阿新 • • 發佈:2019-02-09
程式碼:
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)' } } } ] } ] };
效果: