@easyv/config 1.0.50 → 1.0.53
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/CHANGELOG.md +9 -0
- package/lib/animation.js +2 -1
- package/lib/axisLine.js +2 -1
- package/lib/gridLine.js +2 -1
- package/lib/label.js +19 -13
- package/lib/legend.js +18 -10
- package/lib/pie.js +55 -49
- package/lib/series.js +33 -26
- package/lib/tickLine.js +2 -1
- package/lib/tooltip.js +8 -4
- package/lib/unit.js +2 -1
- package/package.json +7 -3
- package/src/animation.js +2 -1
- package/src/axisLine.js +1 -0
- package/src/gridLine.js +1 -0
- package/src/label.js +18 -12
- package/src/legend.js +27 -13
- package/src/pie.js +212 -182
- package/src/series.js +100 -94
- package/src/tickLine.js +1 -0
- package/src/tooltip.js +4 -0
- package/src/unit.js +1 -0
package/src/animation.js
CHANGED
package/src/axisLine.js
CHANGED
package/src/gridLine.js
CHANGED
package/src/label.js
CHANGED
|
@@ -52,6 +52,7 @@ export default ({
|
|
|
52
52
|
letterSpacing,
|
|
53
53
|
},
|
|
54
54
|
type: 'textStyle',
|
|
55
|
+
markColorType: 'textColor',
|
|
55
56
|
},
|
|
56
57
|
position !== undefined && {
|
|
57
58
|
name: 'position',
|
|
@@ -98,7 +99,7 @@ export const labelOfPie = ({
|
|
|
98
99
|
show = defaultLabelOfPie.show,
|
|
99
100
|
distance = defaultLabelOfPie.distance,
|
|
100
101
|
lineLength = defaultLabelOfPie.lineLength,
|
|
101
|
-
lineColor,
|
|
102
|
+
lineColor, //这个是可选项,如果不在main.js里赋值,就不会出现
|
|
102
103
|
mode = defaultLabelOfPie.mode,
|
|
103
104
|
translate: { x, y } = defaultLabelOfPie.show,
|
|
104
105
|
name: {
|
|
@@ -156,10 +157,10 @@ export const labelOfPie = ({
|
|
|
156
157
|
},
|
|
157
158
|
},
|
|
158
159
|
lineColor !== undefined && {
|
|
159
|
-
name:
|
|
160
|
-
displayName:
|
|
160
|
+
name: 'lineColor',
|
|
161
|
+
displayName: '线颜色',
|
|
161
162
|
value: lineColor,
|
|
162
|
-
type:
|
|
163
|
+
type: 'color',
|
|
163
164
|
},
|
|
164
165
|
{
|
|
165
166
|
rule: [['show', '$eq', true]],
|
|
@@ -201,6 +202,7 @@ export const labelOfPie = ({
|
|
|
201
202
|
displayName: '文本样式',
|
|
202
203
|
value: nameFont,
|
|
203
204
|
type: 'textStyle',
|
|
205
|
+
markColorType: 'textColor',
|
|
204
206
|
},
|
|
205
207
|
],
|
|
206
208
|
},
|
|
@@ -231,6 +233,7 @@ export const labelOfPie = ({
|
|
|
231
233
|
displayName: '文本样式',
|
|
232
234
|
value: percentFont,
|
|
233
235
|
type: 'textStyle',
|
|
236
|
+
markColorType: 'textColor',
|
|
234
237
|
},
|
|
235
238
|
],
|
|
236
239
|
},
|
|
@@ -284,6 +287,7 @@ export const labelOfPie = ({
|
|
|
284
287
|
displayName: '文本样式',
|
|
285
288
|
value: valueFont,
|
|
286
289
|
type: 'textStyle',
|
|
290
|
+
markColorType: 'textColor',
|
|
287
291
|
},
|
|
288
292
|
],
|
|
289
293
|
},
|
|
@@ -294,11 +298,11 @@ const defaultLabelOfRose = {
|
|
|
294
298
|
show: true,
|
|
295
299
|
font: defaultFont,
|
|
296
300
|
gap: 10,
|
|
297
|
-
}
|
|
301
|
+
};
|
|
298
302
|
export const labelOfRose = ({
|
|
299
303
|
show = defaultLabelOfRose.show,
|
|
300
304
|
font: labelFont = defaultLabelOfRose.font,
|
|
301
|
-
gap = defaultLabelOfRose.gap
|
|
305
|
+
gap = defaultLabelOfRose.gap,
|
|
302
306
|
} = defaultLabelOfRose) => ({
|
|
303
307
|
name: 'label',
|
|
304
308
|
displayName: '数值标签',
|
|
@@ -315,17 +319,18 @@ export const labelOfRose = ({
|
|
|
315
319
|
displayName: '文本样式',
|
|
316
320
|
value: font(labelFont),
|
|
317
321
|
type: 'textStyle',
|
|
322
|
+
markColorType: 'textColor',
|
|
318
323
|
},
|
|
319
324
|
{
|
|
320
325
|
...showRule(),
|
|
321
|
-
name:
|
|
322
|
-
displayName:
|
|
326
|
+
name: 'gap',
|
|
327
|
+
displayName: '间距',
|
|
323
328
|
value: gap,
|
|
324
|
-
type:
|
|
329
|
+
type: 'number',
|
|
325
330
|
config: {
|
|
326
|
-
suffix:
|
|
327
|
-
}
|
|
328
|
-
}
|
|
331
|
+
suffix: 'px',
|
|
332
|
+
},
|
|
333
|
+
},
|
|
329
334
|
],
|
|
330
335
|
});
|
|
331
336
|
|
|
@@ -591,6 +596,7 @@ export const axisLabel = ({
|
|
|
591
596
|
displayName: '文本样式',
|
|
592
597
|
value: font,
|
|
593
598
|
type: 'textStyle',
|
|
599
|
+
markColorType: 'textColor',
|
|
594
600
|
},
|
|
595
601
|
],
|
|
596
602
|
});
|
package/src/legend.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
const {
|
|
1
|
+
const {
|
|
2
|
+
translate: translateConfig,
|
|
3
|
+
font,
|
|
4
|
+
show: showConfig,
|
|
5
|
+
showRule,
|
|
6
|
+
} = require('.');
|
|
7
|
+
|
|
2
8
|
const defaultFont = font({
|
|
3
9
|
fontFamily: 'Mircosoft Yahei',
|
|
4
10
|
fontSize: 12,
|
|
@@ -65,6 +71,7 @@ export default ({
|
|
|
65
71
|
displayName: '文本样式',
|
|
66
72
|
value: font,
|
|
67
73
|
type: 'textStyle',
|
|
74
|
+
markColorType: 'textColor',
|
|
68
75
|
},
|
|
69
76
|
{
|
|
70
77
|
name: 'iconSize',
|
|
@@ -212,8 +219,8 @@ const defaultLegendOfRose = {
|
|
|
212
219
|
},
|
|
213
220
|
alignment: 'center bottom',
|
|
214
221
|
translate: { x: 0, y: 0 },
|
|
215
|
-
}
|
|
216
|
-
}
|
|
222
|
+
},
|
|
223
|
+
};
|
|
217
224
|
export const legendOfRose = ({
|
|
218
225
|
show = defaultLegendOfRose.show,
|
|
219
226
|
font = defaultLegendOfRose.font,
|
|
@@ -233,8 +240,8 @@ export const legendOfRose = ({
|
|
|
233
240
|
x = defaultLegendOfRose.layout.translate.x,
|
|
234
241
|
y = defaultLegendOfRose.layout.translate.y,
|
|
235
242
|
} = defaultLegendOfRose.layout.translate,
|
|
236
|
-
} = defaultLegendOfRose.layout
|
|
237
|
-
} = defaultLegendOfRose)=>({
|
|
243
|
+
} = defaultLegendOfRose.layout,
|
|
244
|
+
} = defaultLegendOfRose) => ({
|
|
238
245
|
name: 'legend',
|
|
239
246
|
displayName: '图例',
|
|
240
247
|
value: [
|
|
@@ -245,6 +252,7 @@ export const legendOfRose = ({
|
|
|
245
252
|
displayName: '文本样式',
|
|
246
253
|
value: font,
|
|
247
254
|
type: 'textStyle',
|
|
255
|
+
markColorType: 'textColor',
|
|
248
256
|
},
|
|
249
257
|
{
|
|
250
258
|
name: 'iconSize',
|
|
@@ -340,12 +348,12 @@ export const legendOfRose = ({
|
|
|
340
348
|
...translateConfig(x, y),
|
|
341
349
|
},
|
|
342
350
|
],
|
|
343
|
-
}
|
|
351
|
+
},
|
|
344
352
|
],
|
|
345
353
|
config: {
|
|
346
354
|
defaultOpen: true,
|
|
347
355
|
},
|
|
348
|
-
})
|
|
356
|
+
});
|
|
349
357
|
|
|
350
358
|
const defaultLegendOfPie = {
|
|
351
359
|
show: true,
|
|
@@ -492,6 +500,7 @@ export const legendOfPie = ({
|
|
|
492
500
|
displayName: '文本样式',
|
|
493
501
|
value: nameFont,
|
|
494
502
|
type: 'textStyle',
|
|
503
|
+
markColorType: 'textColor',
|
|
495
504
|
},
|
|
496
505
|
],
|
|
497
506
|
},
|
|
@@ -534,6 +543,7 @@ export const legendOfPie = ({
|
|
|
534
543
|
displayName: '文本样式',
|
|
535
544
|
value: percentFont,
|
|
536
545
|
type: 'textStyle',
|
|
546
|
+
markColorType: 'textColor',
|
|
537
547
|
},
|
|
538
548
|
],
|
|
539
549
|
},
|
|
@@ -603,6 +613,7 @@ export const legendOfPie = ({
|
|
|
603
613
|
displayName: '文本样式',
|
|
604
614
|
value: valueFont,
|
|
605
615
|
type: 'textStyle',
|
|
616
|
+
markColorType: 'textColor',
|
|
606
617
|
},
|
|
607
618
|
],
|
|
608
619
|
},
|
|
@@ -672,10 +683,10 @@ export const legendOfPie = ({
|
|
|
672
683
|
},
|
|
673
684
|
});
|
|
674
685
|
|
|
675
|
-
const defaultLegendOfDoublePie={
|
|
686
|
+
const defaultLegendOfDoublePie = {
|
|
676
687
|
show: true,
|
|
677
|
-
key:
|
|
678
|
-
displayName:
|
|
688
|
+
key: 'legend',
|
|
689
|
+
displayName: '图例',
|
|
679
690
|
iconSize: {
|
|
680
691
|
width: 10,
|
|
681
692
|
height: 10,
|
|
@@ -754,7 +765,7 @@ export const legendOfDoublePie = ({
|
|
|
754
765
|
x = defaultLegendOfDoublePie.layout.translate.x,
|
|
755
766
|
y = defaultLegendOfDoublePie.layout.translate.y,
|
|
756
767
|
} = defaultLegendOfDoublePie.layout.translate,
|
|
757
|
-
extraInput = []
|
|
768
|
+
extraInput = [],
|
|
758
769
|
} = defaultLegendOfDoublePie.layout,
|
|
759
770
|
} = defaultLegendOfDoublePie) => ({
|
|
760
771
|
name: key,
|
|
@@ -806,6 +817,7 @@ export const legendOfDoublePie = ({
|
|
|
806
817
|
displayName: '文本样式',
|
|
807
818
|
value: nameFont,
|
|
808
819
|
type: 'textStyle',
|
|
820
|
+
markColorType: 'textColor',
|
|
809
821
|
},
|
|
810
822
|
],
|
|
811
823
|
},
|
|
@@ -848,6 +860,7 @@ export const legendOfDoublePie = ({
|
|
|
848
860
|
displayName: '文本样式',
|
|
849
861
|
value: percentFont,
|
|
850
862
|
type: 'textStyle',
|
|
863
|
+
markColorType: 'textColor',
|
|
851
864
|
},
|
|
852
865
|
],
|
|
853
866
|
},
|
|
@@ -917,6 +930,7 @@ export const legendOfDoublePie = ({
|
|
|
917
930
|
displayName: '文本样式',
|
|
918
931
|
value: valueFont,
|
|
919
932
|
type: 'textStyle',
|
|
933
|
+
markColorType: 'textColor',
|
|
920
934
|
},
|
|
921
935
|
],
|
|
922
936
|
},
|
|
@@ -958,8 +972,8 @@ export const legendOfDoublePie = ({
|
|
|
958
972
|
],
|
|
959
973
|
type: 'group',
|
|
960
974
|
},
|
|
961
|
-
...extraInput
|
|
962
|
-
].filter(item
|
|
975
|
+
...extraInput,
|
|
976
|
+
].filter((item) => !!item),
|
|
963
977
|
},
|
|
964
978
|
],
|
|
965
979
|
config: {
|