配置项如下
option = {
"legend": {
"orient": "vertical",
"x": "right",
"y": "center",
"itemGap": 15,
"padding": [
15,
70,
15,
8
],
"data": [
"基础DDoS防护(5Gbps)",
"高级DDoS防护(20Gbps)"
],
"show": true,
"textStyle": {
"fontFamily": "微软雅黑"
}
},
graphic: [{
type: 'ring',
shape: {
cx: echarts.number.parsePercent('25%', myChart.getWidth()),
cy: echarts.number.parsePercent('50%', myChart.getHeight()),
r: echarts.number.parsePercent(
'40%', Math.min(myChart.getWidth(), myChart.getHeight()) / 2
),
r0: echarts.number.parsePercent(
'72%', Math.min(myChart.getWidth(), myChart.getHeight()) / 2
)
},
style: {
fill: 'none',
stroke: '#000'
}
}],
"series": [{
"type": "pie",
"center": [
"25%",
"50%"
],
"radius": [
"42%",
"70%"
],
"itemStyle": {
"normal": {
"label": {
position: 'center',
"show": false
},
"labelLine": {
"show": false
}
},
"emphasis": {
"label": {
"show": true,
"formatter": " ",
"position": "center",
"textStyle": {
"fontSize": "13",
"fontWeight": "400",
"color": "#333",
"fontFamily": "微软雅黑"
}
}
}
},
"data": [{
"name": "基础DDoS防护(5Gbps)",
"value": '-'
}, {
"name": "高级DDoS防护(20Gbps)",
"value": '-'
}]
}],
"animation": false
}