config.ts
1.84 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
import { echartOptionProfixHandle, PublicConfigClass } from '@/packages/public'
import { CreateComponentType } from '@/packages/index.d'
import { OverrideWaterPoloConfig } from './index'
import cloneDeep from 'lodash/cloneDeep'
export const shapes = [
{
label: '圆形',
value: 'circle'
},
{
label: '正方形',
value: 'rect'
},
{
label: '带圆角的正方形',
value: 'roundRect'
},
{
label: '正三角形',
value: 'triangle'
},
{
label: '菱形',
value: 'diamond'
},
{
label: '水滴',
value: 'pin'
},
{
label: '箭头',
value: 'arrow'
},
]
export const includes = []
export const option = {
dataset: 0.5,
series: [
{
type: 'liquidFill',
shape: shapes[0].value,
radius: '90%',
data: [0],
center: ['50%', '50%'],
color: [
{
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: '#446bf5',
},
{
offset: 1,
color: '#2ca3e2',
},
],
globalCoord: false,
},
],
backgroundStyle: {
borderWidth: 1,
color: 'rgba(51, 66, 127, 0.7)',
},
label: {
normal: {
textStyle: {
fontSize: 50,
color: '#fff',
},
},
},
outline: {
show: false,
borderDistance: 10,
itemStyle: {
borderWidth: 2,
borderColor: '#112165'
}
}
}
]
}
export default class Config extends PublicConfigClass implements CreateComponentType
{
public key = OverrideWaterPoloConfig.key
public chartConfig = cloneDeep(OverrideWaterPoloConfig)
public option = echartOptionProfixHandle(option, includes)
}