@easyv/config 1.1.3 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +9 -9
- package/CHANGELOG.md +17 -17
- package/index.js +3 -3
- package/lib/animation.js +1 -1
- package/lib/interaction.js +2 -2
- package/lib/mutiColor.js +51 -51
- package/lib/pie.js +47 -20
- package/package.json +30 -30
- package/src/animation.js +256 -256
- package/src/axes.js +162 -162
- package/src/axisLine.js +39 -39
- package/src/brush.js +90 -90
- package/src/dimension.js +49 -49
- package/src/extent.js +29 -29
- package/src/font.js +23 -23
- package/src/gridLine.js +49 -49
- package/src/index.js +96 -96
- package/src/interaction.js +121 -121
- package/src/label.js +722 -722
- package/src/legend.js +982 -982
- package/src/mapping.js +26 -26
- package/src/margin.js +58 -58
- package/src/multiColor.js +30 -30
- package/src/pie.js +1035 -1009
- package/src/sc.js +8 -8
- package/src/series.js +822 -822
- package/src/shadow.js +17 -17
- package/src/show.js +11 -11
- package/src/tickLine.js +51 -51
- package/src/tooltip.js +425 -425
- package/src/translate.js +27 -27
- package/src/unit.js +67 -67
package/src/animation.js
CHANGED
|
@@ -1,256 +1,256 @@
|
|
|
1
|
-
import { multiColor, font } from './';
|
|
2
|
-
const animation = {
|
|
3
|
-
show: false,
|
|
4
|
-
duration: 3,
|
|
5
|
-
interval: 3,
|
|
6
|
-
};
|
|
7
|
-
export default ({
|
|
8
|
-
show = animation.show,
|
|
9
|
-
duration = animation.duration,
|
|
10
|
-
interval = animation.interval,
|
|
11
|
-
} = animation) => ({
|
|
12
|
-
name: 'animation',
|
|
13
|
-
displayName: '轮播动画',
|
|
14
|
-
value: [
|
|
15
|
-
{
|
|
16
|
-
name: 'show',
|
|
17
|
-
displayName: '打开',
|
|
18
|
-
value: show,
|
|
19
|
-
type: 'boolean',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
rule: [['show', '$eq', true]],
|
|
23
|
-
name: 'duration',
|
|
24
|
-
displayName: '滚动时长',
|
|
25
|
-
value: duration,
|
|
26
|
-
type: 'number',
|
|
27
|
-
config: {
|
|
28
|
-
span: 12,
|
|
29
|
-
suffix: 's',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
rule: [['show', '$eq', true]],
|
|
34
|
-
name: 'interval',
|
|
35
|
-
displayName: '间隔时长',
|
|
36
|
-
value: interval,
|
|
37
|
-
type: 'number',
|
|
38
|
-
config: {
|
|
39
|
-
span: 12,
|
|
40
|
-
suffix: 's',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const defaultDataAnimation = {
|
|
47
|
-
show: false,
|
|
48
|
-
duration: 3,
|
|
49
|
-
};
|
|
50
|
-
export const dataAnimation = ({
|
|
51
|
-
show = defaultDataAnimation.show,
|
|
52
|
-
duration = defaultDataAnimation.duration,
|
|
53
|
-
} = defaultDataAnimation) => ({
|
|
54
|
-
name: 'dataAnimation',
|
|
55
|
-
displayName: '
|
|
56
|
-
value: [
|
|
57
|
-
{
|
|
58
|
-
name: 'show',
|
|
59
|
-
displayName: '打开',
|
|
60
|
-
value: show,
|
|
61
|
-
type: 'boolean',
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
rule: [['show', '$eq', true]],
|
|
65
|
-
name: 'duration',
|
|
66
|
-
displayName: '滚动时长',
|
|
67
|
-
value: duration,
|
|
68
|
-
type: 'number',
|
|
69
|
-
config: {
|
|
70
|
-
span: 12,
|
|
71
|
-
suffix: 's',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
],
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
const defaultAnimationOfPie = {
|
|
78
|
-
show: true,
|
|
79
|
-
current: { heighten: 10, opacity: 60 },
|
|
80
|
-
interval: 3,
|
|
81
|
-
interactive: '',
|
|
82
|
-
};
|
|
83
|
-
export const animationOfPie = ({
|
|
84
|
-
show = defaultAnimationOfPie.show,
|
|
85
|
-
current: {
|
|
86
|
-
heighten = defaultAnimationOfPie.current.heighten,
|
|
87
|
-
opacity = defaultAnimationOfPie.current.opacity,
|
|
88
|
-
} = defaultAnimationOfPie.current,
|
|
89
|
-
interval = defaultAnimationOfPie.interval,
|
|
90
|
-
interactive = defaultAnimationOfPie.interactive,
|
|
91
|
-
} = defaultAnimationOfPie) => ({
|
|
92
|
-
name: 'animation',
|
|
93
|
-
displayName: '轮播动画',
|
|
94
|
-
value: [
|
|
95
|
-
{
|
|
96
|
-
name: 'on',
|
|
97
|
-
displayName: '开启',
|
|
98
|
-
value: show,
|
|
99
|
-
type: 'boolean',
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
rule: [['on', '$eq', true]],
|
|
103
|
-
name: 'current',
|
|
104
|
-
displayName: '当前值',
|
|
105
|
-
value: [
|
|
106
|
-
{
|
|
107
|
-
name: 'heighten',
|
|
108
|
-
displayName: '高度增长',
|
|
109
|
-
value: heighten,
|
|
110
|
-
type: 'number',
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
name: 'opacity',
|
|
114
|
-
displayName: '透明度',
|
|
115
|
-
value: opacity,
|
|
116
|
-
type: 'range',
|
|
117
|
-
config: {
|
|
118
|
-
min: 0,
|
|
119
|
-
max: 100,
|
|
120
|
-
suffix: '%',
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
],
|
|
124
|
-
config: {
|
|
125
|
-
defaultOpen: true,
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
rule: [['on', '$eq', true]],
|
|
130
|
-
name: 'interval',
|
|
131
|
-
displayName: '间隔时长',
|
|
132
|
-
value: interval,
|
|
133
|
-
type: 'number',
|
|
134
|
-
config: {
|
|
135
|
-
suffix: 's',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
tip: '选择点击或悬浮,鼠标点击/悬浮各数据块时停止轮播仅显示当前数据信息',
|
|
140
|
-
rule: [['on', '$eq', true]],
|
|
141
|
-
name: 'interactive',
|
|
142
|
-
displayName: '交互方式',
|
|
143
|
-
value: interactive,
|
|
144
|
-
type: 'radio',
|
|
145
|
-
config: {
|
|
146
|
-
options: [
|
|
147
|
-
{ name: '无', value: '' },
|
|
148
|
-
{ name: '点击', value: 'click' },
|
|
149
|
-
{ name: '悬停', value: 'hover' },
|
|
150
|
-
],
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
],
|
|
154
|
-
});
|
|
155
|
-
|
|
156
|
-
const defaultAnimationOfCarousel = {
|
|
157
|
-
show: true,
|
|
158
|
-
current: {
|
|
159
|
-
width: 0.1,
|
|
160
|
-
color: multiColor(),
|
|
161
|
-
font: font(),
|
|
162
|
-
gap: 15,
|
|
163
|
-
},
|
|
164
|
-
interval: 3,
|
|
165
|
-
rotate: 30,
|
|
166
|
-
interactive: true,
|
|
167
|
-
};
|
|
168
|
-
export const animationOfCarousel = ({
|
|
169
|
-
show = defaultAnimationOfCarousel.show,
|
|
170
|
-
current: {
|
|
171
|
-
width = defaultAnimationOfCarousel.current.width,
|
|
172
|
-
color = defaultAnimationOfCarousel.current.color,
|
|
173
|
-
textStyle = defaultAnimationOfCarousel.current.font,
|
|
174
|
-
gap = defaultAnimationOfCarousel.current.gap,
|
|
175
|
-
} = defaultAnimationOfCarousel.current,
|
|
176
|
-
interval = defaultAnimationOfCarousel.interval,
|
|
177
|
-
rotate = defaultAnimationOfCarousel.rotate,
|
|
178
|
-
interactive = defaultAnimationOfCarousel.interactive,
|
|
179
|
-
} = defaultAnimationOfCarousel) => ({
|
|
180
|
-
name: 'animation',
|
|
181
|
-
displayName: '轮播动画',
|
|
182
|
-
value: [
|
|
183
|
-
{
|
|
184
|
-
name: 'on',
|
|
185
|
-
displayName: '开启',
|
|
186
|
-
value: show,
|
|
187
|
-
type: 'boolean',
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
rule: [['on', '$eq', true]],
|
|
191
|
-
name: 'current',
|
|
192
|
-
displayName: '当前值',
|
|
193
|
-
value: [
|
|
194
|
-
{
|
|
195
|
-
name: 'width',
|
|
196
|
-
displayName: '弧宽增长',
|
|
197
|
-
value: width,
|
|
198
|
-
type: 'number',
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
name: 'color',
|
|
202
|
-
displayName: '颜色',
|
|
203
|
-
value: multiColor(color),
|
|
204
|
-
type: 'multicolor',
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
name: 'textStyle',
|
|
208
|
-
displayName: '类目文本样式',
|
|
209
|
-
value: font(textStyle),
|
|
210
|
-
type: 'textStyle',
|
|
211
|
-
markColorType: 'textColor',
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: 'gap',
|
|
215
|
-
displayName: '类目文本间距',
|
|
216
|
-
value: gap,
|
|
217
|
-
type: 'number',
|
|
218
|
-
config: {
|
|
219
|
-
suffix: 'px',
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
],
|
|
223
|
-
config: {
|
|
224
|
-
defaultOpen: true,
|
|
225
|
-
},
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
rule: [['on', '$eq', true]],
|
|
229
|
-
name: 'interval',
|
|
230
|
-
displayName: '间隔时长',
|
|
231
|
-
value: interval,
|
|
232
|
-
type: 'number',
|
|
233
|
-
config: {
|
|
234
|
-
suffix: 's',
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
rule: [['on', '$eq', true]],
|
|
239
|
-
name: 'rotate',
|
|
240
|
-
displayName: '旋转',
|
|
241
|
-
value: rotate,
|
|
242
|
-
type: 'number',
|
|
243
|
-
config: {
|
|
244
|
-
min: 0,
|
|
245
|
-
max: 360,
|
|
246
|
-
suffix: '°',
|
|
247
|
-
},
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
name: 'interactive',
|
|
251
|
-
displayName: '点击交互',
|
|
252
|
-
value: interactive,
|
|
253
|
-
type: 'boolean',
|
|
254
|
-
},
|
|
255
|
-
],
|
|
256
|
-
});
|
|
1
|
+
import { multiColor, font } from './';
|
|
2
|
+
const animation = {
|
|
3
|
+
show: false,
|
|
4
|
+
duration: 3,
|
|
5
|
+
interval: 3,
|
|
6
|
+
};
|
|
7
|
+
export default ({
|
|
8
|
+
show = animation.show,
|
|
9
|
+
duration = animation.duration,
|
|
10
|
+
interval = animation.interval,
|
|
11
|
+
} = animation) => ({
|
|
12
|
+
name: 'animation',
|
|
13
|
+
displayName: '轮播动画',
|
|
14
|
+
value: [
|
|
15
|
+
{
|
|
16
|
+
name: 'show',
|
|
17
|
+
displayName: '打开',
|
|
18
|
+
value: show,
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
rule: [['show', '$eq', true]],
|
|
23
|
+
name: 'duration',
|
|
24
|
+
displayName: '滚动时长',
|
|
25
|
+
value: duration,
|
|
26
|
+
type: 'number',
|
|
27
|
+
config: {
|
|
28
|
+
span: 12,
|
|
29
|
+
suffix: 's',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
rule: [['show', '$eq', true]],
|
|
34
|
+
name: 'interval',
|
|
35
|
+
displayName: '间隔时长',
|
|
36
|
+
value: interval,
|
|
37
|
+
type: 'number',
|
|
38
|
+
config: {
|
|
39
|
+
span: 12,
|
|
40
|
+
suffix: 's',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const defaultDataAnimation = {
|
|
47
|
+
show: false,
|
|
48
|
+
duration: 3,
|
|
49
|
+
};
|
|
50
|
+
export const dataAnimation = ({
|
|
51
|
+
show = defaultDataAnimation.show,
|
|
52
|
+
duration = defaultDataAnimation.duration,
|
|
53
|
+
} = defaultDataAnimation) => ({
|
|
54
|
+
name: 'dataAnimation',
|
|
55
|
+
displayName: '数据动画',
|
|
56
|
+
value: [
|
|
57
|
+
{
|
|
58
|
+
name: 'show',
|
|
59
|
+
displayName: '打开',
|
|
60
|
+
value: show,
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
rule: [['show', '$eq', true]],
|
|
65
|
+
name: 'duration',
|
|
66
|
+
displayName: '滚动时长',
|
|
67
|
+
value: duration,
|
|
68
|
+
type: 'number',
|
|
69
|
+
config: {
|
|
70
|
+
span: 12,
|
|
71
|
+
suffix: 's',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const defaultAnimationOfPie = {
|
|
78
|
+
show: true,
|
|
79
|
+
current: { heighten: 10, opacity: 60 },
|
|
80
|
+
interval: 3,
|
|
81
|
+
interactive: '',
|
|
82
|
+
};
|
|
83
|
+
export const animationOfPie = ({
|
|
84
|
+
show = defaultAnimationOfPie.show,
|
|
85
|
+
current: {
|
|
86
|
+
heighten = defaultAnimationOfPie.current.heighten,
|
|
87
|
+
opacity = defaultAnimationOfPie.current.opacity,
|
|
88
|
+
} = defaultAnimationOfPie.current,
|
|
89
|
+
interval = defaultAnimationOfPie.interval,
|
|
90
|
+
interactive = defaultAnimationOfPie.interactive,
|
|
91
|
+
} = defaultAnimationOfPie) => ({
|
|
92
|
+
name: 'animation',
|
|
93
|
+
displayName: '轮播动画',
|
|
94
|
+
value: [
|
|
95
|
+
{
|
|
96
|
+
name: 'on',
|
|
97
|
+
displayName: '开启',
|
|
98
|
+
value: show,
|
|
99
|
+
type: 'boolean',
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
rule: [['on', '$eq', true]],
|
|
103
|
+
name: 'current',
|
|
104
|
+
displayName: '当前值',
|
|
105
|
+
value: [
|
|
106
|
+
{
|
|
107
|
+
name: 'heighten',
|
|
108
|
+
displayName: '高度增长',
|
|
109
|
+
value: heighten,
|
|
110
|
+
type: 'number',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
name: 'opacity',
|
|
114
|
+
displayName: '透明度',
|
|
115
|
+
value: opacity,
|
|
116
|
+
type: 'range',
|
|
117
|
+
config: {
|
|
118
|
+
min: 0,
|
|
119
|
+
max: 100,
|
|
120
|
+
suffix: '%',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
config: {
|
|
125
|
+
defaultOpen: true,
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
rule: [['on', '$eq', true]],
|
|
130
|
+
name: 'interval',
|
|
131
|
+
displayName: '间隔时长',
|
|
132
|
+
value: interval,
|
|
133
|
+
type: 'number',
|
|
134
|
+
config: {
|
|
135
|
+
suffix: 's',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
tip: '选择点击或悬浮,鼠标点击/悬浮各数据块时停止轮播仅显示当前数据信息',
|
|
140
|
+
rule: [['on', '$eq', true]],
|
|
141
|
+
name: 'interactive',
|
|
142
|
+
displayName: '交互方式',
|
|
143
|
+
value: interactive,
|
|
144
|
+
type: 'radio',
|
|
145
|
+
config: {
|
|
146
|
+
options: [
|
|
147
|
+
{ name: '无', value: '' },
|
|
148
|
+
{ name: '点击', value: 'click' },
|
|
149
|
+
{ name: '悬停', value: 'hover' },
|
|
150
|
+
],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
const defaultAnimationOfCarousel = {
|
|
157
|
+
show: true,
|
|
158
|
+
current: {
|
|
159
|
+
width: 0.1,
|
|
160
|
+
color: multiColor(),
|
|
161
|
+
font: font(),
|
|
162
|
+
gap: 15,
|
|
163
|
+
},
|
|
164
|
+
interval: 3,
|
|
165
|
+
rotate: 30,
|
|
166
|
+
interactive: true,
|
|
167
|
+
};
|
|
168
|
+
export const animationOfCarousel = ({
|
|
169
|
+
show = defaultAnimationOfCarousel.show,
|
|
170
|
+
current: {
|
|
171
|
+
width = defaultAnimationOfCarousel.current.width,
|
|
172
|
+
color = defaultAnimationOfCarousel.current.color,
|
|
173
|
+
textStyle = defaultAnimationOfCarousel.current.font,
|
|
174
|
+
gap = defaultAnimationOfCarousel.current.gap,
|
|
175
|
+
} = defaultAnimationOfCarousel.current,
|
|
176
|
+
interval = defaultAnimationOfCarousel.interval,
|
|
177
|
+
rotate = defaultAnimationOfCarousel.rotate,
|
|
178
|
+
interactive = defaultAnimationOfCarousel.interactive,
|
|
179
|
+
} = defaultAnimationOfCarousel) => ({
|
|
180
|
+
name: 'animation',
|
|
181
|
+
displayName: '轮播动画',
|
|
182
|
+
value: [
|
|
183
|
+
{
|
|
184
|
+
name: 'on',
|
|
185
|
+
displayName: '开启',
|
|
186
|
+
value: show,
|
|
187
|
+
type: 'boolean',
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
rule: [['on', '$eq', true]],
|
|
191
|
+
name: 'current',
|
|
192
|
+
displayName: '当前值',
|
|
193
|
+
value: [
|
|
194
|
+
{
|
|
195
|
+
name: 'width',
|
|
196
|
+
displayName: '弧宽增长',
|
|
197
|
+
value: width,
|
|
198
|
+
type: 'number',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: 'color',
|
|
202
|
+
displayName: '颜色',
|
|
203
|
+
value: multiColor(color),
|
|
204
|
+
type: 'multicolor',
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
name: 'textStyle',
|
|
208
|
+
displayName: '类目文本样式',
|
|
209
|
+
value: font(textStyle),
|
|
210
|
+
type: 'textStyle',
|
|
211
|
+
markColorType: 'textColor',
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
name: 'gap',
|
|
215
|
+
displayName: '类目文本间距',
|
|
216
|
+
value: gap,
|
|
217
|
+
type: 'number',
|
|
218
|
+
config: {
|
|
219
|
+
suffix: 'px',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
config: {
|
|
224
|
+
defaultOpen: true,
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
rule: [['on', '$eq', true]],
|
|
229
|
+
name: 'interval',
|
|
230
|
+
displayName: '间隔时长',
|
|
231
|
+
value: interval,
|
|
232
|
+
type: 'number',
|
|
233
|
+
config: {
|
|
234
|
+
suffix: 's',
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
rule: [['on', '$eq', true]],
|
|
239
|
+
name: 'rotate',
|
|
240
|
+
displayName: '旋转',
|
|
241
|
+
value: rotate,
|
|
242
|
+
type: 'number',
|
|
243
|
+
config: {
|
|
244
|
+
min: 0,
|
|
245
|
+
max: 360,
|
|
246
|
+
suffix: '°',
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: 'interactive',
|
|
251
|
+
displayName: '点击交互',
|
|
252
|
+
value: interactive,
|
|
253
|
+
type: 'boolean',
|
|
254
|
+
},
|
|
255
|
+
],
|
|
256
|
+
});
|