@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/src/series.js CHANGED
@@ -38,9 +38,9 @@ const defaultBandSeries = {
38
38
  },
39
39
  size: {
40
40
  width: 10,
41
- height: 10
41
+ height: 10,
42
42
  },
43
- opacity: 0.65
43
+ opacity: 0.65,
44
44
  };
45
45
 
46
46
  export const bandSeries = (
@@ -61,7 +61,7 @@ export const bandSeries = (
61
61
  fill = defaultBandSeries.fill,
62
62
  size: {
63
63
  width: urlWidth = defaultBandSeries.size.width,
64
- height: urlHeight = defaultBandSeries.size.height
64
+ height: urlHeight = defaultBandSeries.size.height,
65
65
  } = defaultBandSeries.size,
66
66
  opacity = defaultBandSeries.opacity,
67
67
  highlight: {
@@ -112,6 +112,8 @@ export const bandSeries = (
112
112
  displayName: '颜色',
113
113
  type: 'multicolor',
114
114
  value: fill,
115
+ markColorType: 'seriesGradient',
116
+
115
117
  },
116
118
  fillType !== undefined && {
117
119
  rule: [['fillType', '$eq', 'pattern']],
@@ -142,17 +144,18 @@ export const bandSeries = (
142
144
  },
143
145
  fillType !== undefined && {
144
146
  rule: [['fillType', '$eq', 'pattern']],
145
- type: "range",
146
- name: "opacity",
147
- displayName: "透明度",
147
+ type: 'range',
148
+ name: 'opacity',
149
+ displayName: '透明度',
148
150
  value: opacity,
149
- config: { max: 1, min: 0, step: 0.01 }
151
+ config: { max: 1, min: 0, step: 0.01 },
150
152
  },
151
153
  (patternType !== undefined || fillType === undefined) && {
152
154
  name: 'fill',
153
155
  displayName: '颜色',
154
156
  type: 'multicolor',
155
157
  value: fill,
158
+ markColorType: 'seriesGradient',
156
159
  },
157
160
  patternType !== undefined && {
158
161
  name: 'patternType',
@@ -261,7 +264,7 @@ const defaultLineSeries = {
261
264
  areaType: 'color',
262
265
  size: {
263
266
  width: 10,
264
- height: 10
267
+ height: 10,
265
268
  },
266
269
  url: 'components/static-image/superChart/pattern.png',
267
270
  opacity: 0.65,
@@ -289,8 +292,8 @@ const defaultIcon = {
289
292
  image: 'components/static-image/superChart/fang.png',
290
293
  size: {
291
294
  width: 10,
292
- height: 10
293
- }
295
+ height: 10,
296
+ },
294
297
  };
295
298
 
296
299
  const commonLine = (
@@ -303,64 +306,65 @@ const commonLine = (
303
306
  connectNulls = defaultLineSeries.line.connectNulls,
304
307
  } = defaultLineSeries.line
305
308
  ) => [
306
- {
307
- name: 'type',
308
- displayName: '类型',
309
- value: type,
310
- type: 'select',
311
- config: {
312
- options: [
313
- {
314
- name: '实线',
315
- value: 'solid',
316
- },
317
- {
318
- name: '虚线',
319
- value: 'dash',
320
- },
321
- ],
322
- },
323
- },
324
- {
325
- name: 'color',
326
- displayName: '颜色',
327
- value: color,
328
- type: 'color',
329
- },
330
- {
331
- name: 'lineWidth',
332
- displayName: '粗细',
333
- value: lineWidth,
334
- type: 'input',
335
- config: {
336
- suffix: 'px',
337
- },
338
- },
339
- {
340
- name: 'curve',
341
- displayName: '曲线',
342
- value: curve,
343
- type: 'boolean',
309
+ {
310
+ name: 'type',
311
+ displayName: '类型',
312
+ value: type,
313
+ type: 'select',
314
+ config: {
315
+ options: [
316
+ {
317
+ name: '实线',
318
+ value: 'solid',
319
+ },
320
+ {
321
+ name: '虚线',
322
+ value: 'dash',
323
+ },
324
+ ],
344
325
  },
345
- {
346
- rule: [['curve', '$eq', true]],
347
- name: 'tension',
348
- displayName: '曲线张力',
349
- value: tension,
350
- type: 'range',
351
- config: {
352
- min: 0,
353
- max: 1,
354
- step: 0.1,
355
- },
326
+ },
327
+ {
328
+ name: 'color',
329
+ displayName: '颜色',
330
+ value: color,
331
+ type: 'color',
332
+ markColorType: 'palette',
333
+ },
334
+ {
335
+ name: 'lineWidth',
336
+ displayName: '粗细',
337
+ value: lineWidth,
338
+ type: 'input',
339
+ config: {
340
+ suffix: 'px',
356
341
  },
357
- {
358
- name: 'connectNulls',
359
- displayName: 'null值连接',
360
- value: connectNulls,
361
- type: 'boolean',
342
+ },
343
+ {
344
+ name: 'curve',
345
+ displayName: '曲线',
346
+ value: curve,
347
+ type: 'boolean',
348
+ },
349
+ {
350
+ rule: [['curve', '$eq', true]],
351
+ name: 'tension',
352
+ displayName: '曲线张力',
353
+ value: tension,
354
+ type: 'range',
355
+ config: {
356
+ min: 0,
357
+ max: 1,
358
+ step: 0.1,
362
359
  },
363
- ];
360
+ },
361
+ {
362
+ name: 'connectNulls',
363
+ displayName: 'null值连接',
364
+ value: connectNulls,
365
+ type: 'boolean',
366
+ },
367
+ ];
364
368
 
365
369
  const lighter = (
366
370
  {
@@ -386,6 +390,7 @@ const lighter = (
386
390
  displayName: '颜色',
387
391
  type: 'multicolor',
388
392
  value: fill,
393
+ markColorType: 'seriesGradient',
389
394
  },
390
395
  {
391
396
  rule: [['show', '$eq', true]],
@@ -427,8 +432,8 @@ const icon = ({
427
432
  image = defaultIcon.image,
428
433
  size: {
429
434
  width: imageWidth = defaultIcon.size.width,
430
- height: imageHeight = defaultIcon.size.height
431
- } = defaultIcon.size
435
+ height: imageHeight = defaultIcon.size.height,
436
+ } = defaultIcon.size,
432
437
  } = defaultIcon) => ({
433
438
  name: 'icon',
434
439
  displayName: '数据标记',
@@ -642,9 +647,9 @@ export const areaSeries = (
642
647
  url = defaultLineSeries.url,
643
648
  size: {
644
649
  width: urlWidth = defaultLineSeries.size.width,
645
- height: urlHeight = defaultLineSeries.size.height
650
+ height: urlHeight = defaultLineSeries.size.height,
646
651
  } = defaultLineSeries.size,
647
- opacity = defaultLineSeries.opacity
652
+ opacity = defaultLineSeries.opacity,
648
653
  } = defaultLineSeries
649
654
  ) => ({
650
655
  name,
@@ -664,16 +669,16 @@ export const areaSeries = (
664
669
  },
665
670
  },
666
671
  {
667
- name: "areaType",
668
- displayName: "区域样式",
672
+ name: 'areaType',
673
+ displayName: '区域样式',
669
674
  value: areaType,
670
675
  type: 'radio',
671
676
  config: {
672
677
  options: [
673
- { name: "颜色", value: "color" },
674
- { name: "纹理", value: "pattern" }
675
- ]
676
- }
678
+ { name: '颜色', value: 'color' },
679
+ { name: '纹理', value: 'pattern' },
680
+ ],
681
+ },
677
682
  },
678
683
  {
679
684
  rule: [['areaType', '$eq', 'color']],
@@ -681,15 +686,14 @@ export const areaSeries = (
681
686
  displayName: '区域颜色',
682
687
  type: 'multicolor',
683
688
  value: areaColor,
689
+ markColorType: 'seriesGradient',
684
690
  },
685
691
  {
686
- rule: [
687
- ['areaType', '$eq', 'pattern']
688
- ],
689
- name: "url",
690
- displayName: "纹理图片",
692
+ rule: [['areaType', '$eq', 'pattern']],
693
+ name: 'url',
694
+ displayName: '纹理图片',
691
695
  value: url,
692
- type: "uploadImage"
696
+ type: 'uploadImage',
693
697
  },
694
698
  {
695
699
  rule: [['areaType', '$eq', 'pattern']],
@@ -713,11 +717,11 @@ export const areaSeries = (
713
717
  },
714
718
  {
715
719
  rule: [['areaType', '$eq', 'pattern']],
716
- type: "range",
717
- name: "opacity",
718
- displayName: "透明度",
720
+ type: 'range',
721
+ name: 'opacity',
722
+ displayName: '透明度',
719
723
  value: opacity,
720
- config: { max: 1, min: 0, step: 0.01 }
724
+ config: { max: 1, min: 0, step: 0.01 },
721
725
  },
722
726
  {
723
727
  name: 'line',
@@ -731,7 +735,7 @@ export const areaSeries = (
731
735
  tension,
732
736
  connectNulls,
733
737
  }),
734
- // lineLighter && lighter(lineLighter),
738
+ lineLighter && lighter(lineLighter),
735
739
  ].filter((item) => !!item),
736
740
  },
737
741
  label(areaLabel),
@@ -763,7 +767,7 @@ export const pieSeries = (
763
767
  displayName = defaultPieSeries.mapping.displayName,
764
768
  } = defaultPieSeries.mapping,
765
769
  color = defaultPieSeries.color,
766
- currentColor
770
+ currentColor,
767
771
  } = defaultPieSeries
768
772
  ) => ({
769
773
  name: name,
@@ -775,20 +779,21 @@ export const pieSeries = (
775
779
  displayName: currentColor != undefined ? '默认颜色' : '颜色',
776
780
  type: 'multicolor',
777
781
  value: multiColor(color),
782
+ markColorType: 'seriesGradient',
778
783
  },
779
784
  currentColor != undefined && {
780
785
  name: 'currentColor',
781
786
  displayName: '当前颜色',
782
- type: "multicolor",
783
- value: multiColor(currentColor)
784
- }
787
+ type: 'multicolor',
788
+ value: multiColor(currentColor),
789
+ },
785
790
  ].filter((item) => !!item),
786
791
  type: 'object',
787
792
  });
788
793
 
789
794
  const defaultPurePieSeries = {
790
795
  mapping: _mapping,
791
- color: "#fff"
796
+ color: '#fff',
792
797
  };
793
798
  export const purePieSeries = (
794
799
  name = Math.random() + '',
@@ -797,7 +802,7 @@ export const purePieSeries = (
797
802
  fieldName = defaultPurePieSeries.mapping.fieldName,
798
803
  displayName = defaultPurePieSeries.mapping.displayName,
799
804
  } = defaultPurePieSeries.mapping,
800
- color = defaultPurePieSeries.color
805
+ color = defaultPurePieSeries.color,
801
806
  } = defaultPurePieSeries
802
807
  ) => ({
803
808
  name: name,
@@ -809,7 +814,8 @@ export const purePieSeries = (
809
814
  displayName: '填充',
810
815
  type: 'color',
811
816
  value: color,
812
- }
817
+ markColorType: 'palette',
818
+ },
813
819
  ],
814
820
  type: 'object',
815
- });
821
+ });
package/src/tickLine.js CHANGED
@@ -25,6 +25,7 @@ export default ({
25
25
  displayName: '颜色',
26
26
  value: color,
27
27
  type: 'color',
28
+ markColorType: 'assistColor',
28
29
  },
29
30
  {
30
31
  rule: [['show', '$eq', true]],
package/src/tooltip.js CHANGED
@@ -221,6 +221,7 @@ export default ({
221
221
  letterSpacing: xAxisLetterSpacing,
222
222
  },
223
223
  type: 'textStyle',
224
+ markColorType: 'textColor',
224
225
  },
225
226
  {
226
227
  name: 'align',
@@ -275,6 +276,7 @@ export default ({
275
276
  letterSpacing: nameLetterSpacing,
276
277
  },
277
278
  type: 'textStyle',
279
+ markColorType: 'textColor',
278
280
  },
279
281
  {
280
282
  name: 'value',
@@ -288,6 +290,7 @@ export default ({
288
290
  letterSpacing: valueFontLetterSpacing,
289
291
  },
290
292
  type: 'textStyle',
293
+ markColorType: 'textColor',
291
294
  },
292
295
  {
293
296
  name: 'suffix',
@@ -386,6 +389,7 @@ export default ({
386
389
  letterSpacing: suffixLetterSpacing,
387
390
  },
388
391
  type: 'textStyle',
392
+ markColorType: 'textColor',
389
393
  },
390
394
  translate(x, y),
391
395
  ],
package/src/unit.js CHANGED
@@ -57,6 +57,7 @@ export default ({
57
57
  letterSpacing,
58
58
  },
59
59
  type: 'textStyle',
60
+ markColorType: 'textColor',
60
61
  },
61
62
  {
62
63
  rule: [['show', '$eq', true]],