外面的两个圈效果是动态的
注释部分为核心代码
// let angle = 0;//角度
option = {
backgroundColor: '#2c343c',
title: {
text: 'Customized Pie',
left: 'center',
top: 20,
textStyle: {
color: '#ccc'
}
},
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
visualMap: {
show: false,
min: 80,
max: 600,
inRange: {
colorLightness: [0, 1]
}
},
series: [
// {
// name: "ring",
// type: 'custom',
// coordinateSystem: "none",
// renderItem: function(params, api) {
// return {
// type: 'arc',
// shape: {
// cx: api.getWidth() / 2,
// cy: api.getHeight() / 2,
// r: Math.min(api.getWidth(), api.getHeight()) / 2 * 0.57,
// startAngle: (0+angle) * Math.PI / 180,
// endAngle: (90+angle) * Math.PI / 180
// },
// style: {
// stroke: "#0CD3DB",
// fill: "transparent",
// lineWidth: 1.5
// },
//