index.config.ts
1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
export const getDefaultOption = (unit: string = '℃') => {
return {
series: [{
type: 'gauge',
min: 0,
max: 100,
startAngle: 200, // 仪表盘起始角度
endAngle: -20, // 仪表盘结束角度
radius: '85%',
progress: {
show: true,
width: 15,
},
axisLine: {
lineStyle: {
width: 15,
},
},
axisTick: { // 是否显示刻度
show: true,
distance: 2,
},
splitLine: { // 分割线
length: 8,
show: true,
distance: 2,
lineStyle: {
width: 2,
},
},
pointer: { // 指针
show: false,
},
axisLabel: {
distance: 18,
color: '#999',
fontSize: 14,
},
title: {
show: false,
},
detail: {
valueAnimation: true,
fontSize: 17,
offsetCenter: [0, 0],
formatter: `{value} ${unit}`,
color: 'inherit',
},
data: [
{
value: 70,
},
],
}],
}
}