option = {
angleAxis: {
startAngle: 240,
max: 10,
clockwise: false, // 顺时针
// 隐藏刻度线
show: false
},
radiusAxis: {
type: 'category',
show: true,
axisLabel: {
show: false
},
axisLine: {
show: false
},
axisTick: {
show: false
}
},
polar: {
center: ['50%', '40%'],
radius: '200%' //图形大小
},
series: [
{
stack: '测试',
type: 'bar',
data: [3],
coordinateSystem: 'polar',
barWidth: 10,
silent: true,
roundCap: true,
itemStyle: {
normal: {
opacity: 1,
color: {
type: 'linear',
x: 0,
y: 0,
colorStops: [
{
offset: 0,
color: '#D02E2E' // 0% 处的颜色
},
{
offset: 1,
color: '#FFB1B1' // 100% 处的颜色
}
],
global: false // 缺省为 false
},
borderWidth: 3
}
}
},
{
z: 100,
stack: '测试',
type: 'bar',
data: [0.01],
coordinateSystem: 'polar',
roundCap: true,
itemStyle: {
color: '#fff',
borderColor: '#D12F2F',
borderWidth: 5
}
},
{
z: 2,
stack: '测试',
type: 'bar',
data: [0.2],
coordinateSystem: 'polar',
silent: true,
roundCap: true,
itemStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
colorStops: [
{
offset: 0,
color: '#CFD3DF' // 0% 处的颜色
},
{
offset: 1,
color: '#CFD3DF' // 100% 处的颜色
}
]
},
borderColor: '#CFD3DF',
borderWidth: 0
}
}
]
};