彩色拱形由4种颜色组成,具体所占百分比如何计算呢?
配置项如下
var myRate1 = 1000;
option={
backgroundColor: '#031845',
series: [{
type: 'gauge',
center: ['50%', '55%'], // 默认全局居中
radius: '75%',
splitNumber: 1, //刻度数量
min: 0,
max: 100,
startAngle: 200,
endAngle: -20,
clockwise: true,
axisLine: {
show: true,
lineStyle: {
width: 2,
shadowBlur: 0,
color: [
[1, '#fff']
]
}
},
axisTick: {
show: true,
lineStyle: {
color: '#fff',
width: 1
},
length: -15,
splitNumber: 1
},
splitLine: {
show: false,
length: -20,
lineStyle: {
color: '#fff',
}
},
axisLabel: {
distance: -20,
textStyle: {
color: "#fff",
fontSize: "15",
fontWeight: "bold"
}
},
pointer: { //仪表盘指针
show: 0
},
detail: {
show: false
},
data: [{
name: "",
value: myRate1
}]
}, {
name: '累计受理',
type: 'gauge',
startAngle: 200,
endAngle: -20,
radius: '72%',
center: ['50%', '55%'], // 默认全局居中
min: 0,
max: 1000,
axisLine: {
show: false,
lineStyle: {
width: 25,
shadowBlur: 0,
color: [
[0.2, '#00FAFC'],
[0.5, '#3BD542'],
[0.6, '#E3F424'],
[0.8, '#7E48DA'],
[1, '#E531A8']
]
}
},
axisTick: {
show: false,
},
splitLine: {
show: false,
length: 20,
},
axisLabel: {
show: false
},
pointer: {
show: false,
},
detail: {
show: true,
offsetCenter: [0, '40%'],
textStyle: {
fontSize: 30
}
},
itemStyle: {
normal: {
color: "#03B7C9",
}
},
data: [{
value: 436
}]
},
]
}