@easyv/config 1.0.49 → 1.0.54

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
@@ -5,7 +5,6 @@ const _mapping = { fieldName: '', displayName: '' };
5
5
  const defaultBandSeries = {
6
6
  mapping: _mapping,
7
7
  yOrZ: 'y',
8
- fillType: 'color',
9
8
  fillImage: 'components/static-image/superChart/pattern.png',
10
9
  fill: {
11
10
  type: 'linear',
@@ -39,9 +38,9 @@ const defaultBandSeries = {
39
38
  },
40
39
  size: {
41
40
  width: 10,
42
- height: 10
41
+ height: 10,
43
42
  },
44
- opacity: 0.65
43
+ opacity: 0.65,
45
44
  };
46
45
 
47
46
  export const bandSeries = (
@@ -62,7 +61,7 @@ export const bandSeries = (
62
61
  fill = defaultBandSeries.fill,
63
62
  size: {
64
63
  width: urlWidth = defaultBandSeries.size.width,
65
- height: urlHeight = defaultBandSeries.size.height
64
+ height: urlHeight = defaultBandSeries.size.height,
66
65
  } = defaultBandSeries.size,
67
66
  opacity = defaultBandSeries.opacity,
68
67
  highlight: {
@@ -95,7 +94,7 @@ export const bandSeries = (
95
94
  value: stack,
96
95
  type: 'input',
97
96
  },
98
- patternType === undefined && {
97
+ fillType !== undefined && {
99
98
  name: 'fillType',
100
99
  displayName: '填充样式',
101
100
  value: fillType,
@@ -107,21 +106,23 @@ export const bandSeries = (
107
106
  ],
108
107
  },
109
108
  },
110
- patternType === undefined && {
109
+ fillType !== undefined && {
111
110
  rule: [['fillType', '$eq', 'color']],
112
111
  name: 'fill',
113
112
  displayName: '颜色',
114
113
  type: 'multicolor',
115
114
  value: fill,
115
+ markColorType: 'seriesGradient',
116
+
116
117
  },
117
- patternType === undefined && {
118
+ fillType !== undefined && {
118
119
  rule: [['fillType', '$eq', 'pattern']],
119
120
  name: 'url',
120
121
  displayName: '纹理图片',
121
122
  type: 'uploadImage',
122
123
  value: fillImage,
123
124
  },
124
- patternType === undefined && {
125
+ fillType !== undefined && {
125
126
  rule: [['fillType', '$eq', 'pattern']],
126
127
  name: 'size',
127
128
  displayName: '尺寸',
@@ -141,19 +142,20 @@ export const bandSeries = (
141
142
  ],
142
143
  type: 'group',
143
144
  },
144
- patternType === undefined && {
145
+ fillType !== undefined && {
145
146
  rule: [['fillType', '$eq', 'pattern']],
146
- type: "range",
147
- name: "opacity",
148
- displayName: "透明度",
147
+ type: 'range',
148
+ name: 'opacity',
149
+ displayName: '透明度',
149
150
  value: opacity,
150
- config: { max: 1, min: 0, step: 0.01 }
151
+ config: { max: 1, min: 0, step: 0.01 },
151
152
  },
152
- patternType !== undefined && {
153
+ (patternType !== undefined || fillType === undefined) && {
153
154
  name: 'fill',
154
155
  displayName: '颜色',
155
156
  type: 'multicolor',
156
157
  value: fill,
158
+ markColorType: 'seriesGradient',
157
159
  },
158
160
  patternType !== undefined && {
159
161
  name: 'patternType',
@@ -262,7 +264,7 @@ const defaultLineSeries = {
262
264
  areaType: 'color',
263
265
  size: {
264
266
  width: 10,
265
- height: 10
267
+ height: 10,
266
268
  },
267
269
  url: 'components/static-image/superChart/pattern.png',
268
270
  opacity: 0.65,
@@ -282,7 +284,7 @@ const defaultLineSeries = {
282
284
  };
283
285
  const defaultIcon = {
284
286
  show: true,
285
- mode: 'double',
287
+ mode: 'single',
286
288
  inner: { color: '#83C4FF', radius: 3 },
287
289
  outer: { color: 'rgba(24,144,255,0.4)', radius: 6 },
288
290
  color: '#1283E3',
@@ -290,8 +292,8 @@ const defaultIcon = {
290
292
  image: 'components/static-image/superChart/fang.png',
291
293
  size: {
292
294
  width: 10,
293
- height: 10
294
- }
295
+ height: 10,
296
+ },
295
297
  };
296
298
 
297
299
  const commonLine = (
@@ -304,64 +306,65 @@ const commonLine = (
304
306
  connectNulls = defaultLineSeries.line.connectNulls,
305
307
  } = defaultLineSeries.line
306
308
  ) => [
307
- {
308
- name: 'type',
309
- displayName: '类型',
310
- value: type,
311
- type: 'select',
312
- config: {
313
- options: [
314
- {
315
- name: '实线',
316
- value: 'solid',
317
- },
318
- {
319
- name: '虚线',
320
- value: 'dash',
321
- },
322
- ],
323
- },
324
- },
325
- {
326
- name: 'color',
327
- displayName: '颜色',
328
- value: color,
329
- type: 'color',
330
- },
331
- {
332
- name: 'lineWidth',
333
- displayName: '粗细',
334
- value: lineWidth,
335
- type: 'input',
336
- config: {
337
- suffix: 'px',
338
- },
339
- },
340
- {
341
- name: 'curve',
342
- displayName: '曲线',
343
- value: curve,
344
- 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
+ ],
345
325
  },
346
- {
347
- rule: [['curve', '$eq', true]],
348
- name: 'tension',
349
- displayName: '曲线张力',
350
- value: tension,
351
- type: 'range',
352
- config: {
353
- min: 0,
354
- max: 1,
355
- step: 0.1,
356
- },
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',
357
341
  },
358
- {
359
- name: 'connectNulls',
360
- displayName: 'null值连接',
361
- value: connectNulls,
362
- 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,
363
359
  },
364
- ];
360
+ },
361
+ {
362
+ name: 'connectNulls',
363
+ displayName: 'null值连接',
364
+ value: connectNulls,
365
+ type: 'boolean',
366
+ },
367
+ ];
365
368
 
366
369
  const lighter = (
367
370
  {
@@ -387,6 +390,7 @@ const lighter = (
387
390
  displayName: '颜色',
388
391
  type: 'multicolor',
389
392
  value: fill,
393
+ markColorType: 'seriesGradient',
390
394
  },
391
395
  {
392
396
  rule: [['show', '$eq', true]],
@@ -428,8 +432,8 @@ const icon = ({
428
432
  image = defaultIcon.image,
429
433
  size: {
430
434
  width: imageWidth = defaultIcon.size.width,
431
- height: imageHeight = defaultIcon.size.height
432
- } = defaultIcon.size
435
+ height: imageHeight = defaultIcon.size.height,
436
+ } = defaultIcon.size,
433
437
  } = defaultIcon) => ({
434
438
  name: 'icon',
435
439
  displayName: '数据标记',
@@ -563,6 +567,7 @@ const icon = ({
563
567
  displayName: '颜色',
564
568
  value: color,
565
569
  type: 'color',
570
+ markColorType: 'palette',
566
571
  },
567
572
  {
568
573
  rule: [
@@ -643,9 +648,9 @@ export const areaSeries = (
643
648
  url = defaultLineSeries.url,
644
649
  size: {
645
650
  width: urlWidth = defaultLineSeries.size.width,
646
- height: urlHeight = defaultLineSeries.size.height
651
+ height: urlHeight = defaultLineSeries.size.height,
647
652
  } = defaultLineSeries.size,
648
- opacity = defaultLineSeries.opacity
653
+ opacity = defaultLineSeries.opacity,
649
654
  } = defaultLineSeries
650
655
  ) => ({
651
656
  name,
@@ -665,16 +670,16 @@ export const areaSeries = (
665
670
  },
666
671
  },
667
672
  {
668
- name: "areaType",
669
- displayName: "区域样式",
673
+ name: 'areaType',
674
+ displayName: '区域样式',
670
675
  value: areaType,
671
676
  type: 'radio',
672
677
  config: {
673
678
  options: [
674
- { name: "颜色", value: "color" },
675
- { name: "纹理", value: "pattern" }
676
- ]
677
- }
679
+ { name: '颜色', value: 'color' },
680
+ { name: '纹理', value: 'pattern' },
681
+ ],
682
+ },
678
683
  },
679
684
  {
680
685
  rule: [['areaType', '$eq', 'color']],
@@ -682,15 +687,14 @@ export const areaSeries = (
682
687
  displayName: '区域颜色',
683
688
  type: 'multicolor',
684
689
  value: areaColor,
690
+ markColorType: 'seriesGradient',
685
691
  },
686
692
  {
687
- rule: [
688
- ['areaType', '$eq', 'pattern']
689
- ],
690
- name: "url",
691
- displayName: "纹理图片",
693
+ rule: [['areaType', '$eq', 'pattern']],
694
+ name: 'url',
695
+ displayName: '纹理图片',
692
696
  value: url,
693
- type: "uploadImage"
697
+ type: 'uploadImage',
694
698
  },
695
699
  {
696
700
  rule: [['areaType', '$eq', 'pattern']],
@@ -714,11 +718,11 @@ export const areaSeries = (
714
718
  },
715
719
  {
716
720
  rule: [['areaType', '$eq', 'pattern']],
717
- type: "range",
718
- name: "opacity",
719
- displayName: "透明度",
721
+ type: 'range',
722
+ name: 'opacity',
723
+ displayName: '透明度',
720
724
  value: opacity,
721
- config: { max: 1, min: 0, step: 0.01 }
725
+ config: { max: 1, min: 0, step: 0.01 },
722
726
  },
723
727
  {
724
728
  name: 'line',
@@ -732,7 +736,7 @@ export const areaSeries = (
732
736
  tension,
733
737
  connectNulls,
734
738
  }),
735
- // lineLighter && lighter(lineLighter),
739
+ lineLighter && lighter(lineLighter),
736
740
  ].filter((item) => !!item),
737
741
  },
738
742
  label(areaLabel),
@@ -764,7 +768,7 @@ export const pieSeries = (
764
768
  displayName = defaultPieSeries.mapping.displayName,
765
769
  } = defaultPieSeries.mapping,
766
770
  color = defaultPieSeries.color,
767
- currentColor
771
+ currentColor,
768
772
  } = defaultPieSeries
769
773
  ) => ({
770
774
  name: name,
@@ -776,20 +780,21 @@ export const pieSeries = (
776
780
  displayName: currentColor != undefined ? '默认颜色' : '颜色',
777
781
  type: 'multicolor',
778
782
  value: multiColor(color),
783
+ markColorType: 'seriesGradient',
779
784
  },
780
785
  currentColor != undefined && {
781
786
  name: 'currentColor',
782
787
  displayName: '当前颜色',
783
- type: "multicolor",
784
- value: multiColor(currentColor)
785
- }
788
+ type: 'multicolor',
789
+ value: multiColor(currentColor),
790
+ },
786
791
  ].filter((item) => !!item),
787
792
  type: 'object',
788
793
  });
789
794
 
790
795
  const defaultPurePieSeries = {
791
796
  mapping: _mapping,
792
- color: "#fff"
797
+ color: '#fff',
793
798
  };
794
799
  export const purePieSeries = (
795
800
  name = Math.random() + '',
@@ -798,7 +803,7 @@ export const purePieSeries = (
798
803
  fieldName = defaultPurePieSeries.mapping.fieldName,
799
804
  displayName = defaultPurePieSeries.mapping.displayName,
800
805
  } = defaultPurePieSeries.mapping,
801
- color = defaultPurePieSeries.color
806
+ color = defaultPurePieSeries.color,
802
807
  } = defaultPurePieSeries
803
808
  ) => ({
804
809
  name: name,
@@ -810,7 +815,8 @@ export const purePieSeries = (
810
815
  displayName: '填充',
811
816
  type: 'color',
812
817
  value: color,
813
- }
818
+ markColorType: 'palette',
819
+ },
814
820
  ],
815
821
  type: 'object',
816
- });
822
+ });
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]],