@easyv/config 1.0.50 → 1.0.55

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,
@@ -281,7 +284,7 @@ const defaultLineSeries = {
281
284
  };
282
285
  const defaultIcon = {
283
286
  show: true,
284
- mode: 'double',
287
+ mode: 'single',
285
288
  inner: { color: '#83C4FF', radius: 3 },
286
289
  outer: { color: 'rgba(24,144,255,0.4)', radius: 6 },
287
290
  color: '#1283E3',
@@ -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: '数据标记',
@@ -562,6 +567,7 @@ const icon = ({
562
567
  displayName: '颜色',
563
568
  value: color,
564
569
  type: 'color',
570
+ markColorType: 'palette',
565
571
  },
566
572
  {
567
573
  rule: [
@@ -642,9 +648,9 @@ export const areaSeries = (
642
648
  url = defaultLineSeries.url,
643
649
  size: {
644
650
  width: urlWidth = defaultLineSeries.size.width,
645
- height: urlHeight = defaultLineSeries.size.height
651
+ height: urlHeight = defaultLineSeries.size.height,
646
652
  } = defaultLineSeries.size,
647
- opacity = defaultLineSeries.opacity
653
+ opacity = defaultLineSeries.opacity,
648
654
  } = defaultLineSeries
649
655
  ) => ({
650
656
  name,
@@ -664,16 +670,16 @@ export const areaSeries = (
664
670
  },
665
671
  },
666
672
  {
667
- name: "areaType",
668
- displayName: "区域样式",
673
+ name: 'areaType',
674
+ displayName: '区域样式',
669
675
  value: areaType,
670
676
  type: 'radio',
671
677
  config: {
672
678
  options: [
673
- { name: "颜色", value: "color" },
674
- { name: "纹理", value: "pattern" }
675
- ]
676
- }
679
+ { name: '颜色', value: 'color' },
680
+ { name: '纹理', value: 'pattern' },
681
+ ],
682
+ },
677
683
  },
678
684
  {
679
685
  rule: [['areaType', '$eq', 'color']],
@@ -681,15 +687,14 @@ export const areaSeries = (
681
687
  displayName: '区域颜色',
682
688
  type: 'multicolor',
683
689
  value: areaColor,
690
+ markColorType: 'seriesGradient',
684
691
  },
685
692
  {
686
- rule: [
687
- ['areaType', '$eq', 'pattern']
688
- ],
689
- name: "url",
690
- displayName: "纹理图片",
693
+ rule: [['areaType', '$eq', 'pattern']],
694
+ name: 'url',
695
+ displayName: '纹理图片',
691
696
  value: url,
692
- type: "uploadImage"
697
+ type: 'uploadImage',
693
698
  },
694
699
  {
695
700
  rule: [['areaType', '$eq', 'pattern']],
@@ -713,11 +718,11 @@ export const areaSeries = (
713
718
  },
714
719
  {
715
720
  rule: [['areaType', '$eq', 'pattern']],
716
- type: "range",
717
- name: "opacity",
718
- displayName: "透明度",
721
+ type: 'range',
722
+ name: 'opacity',
723
+ displayName: '透明度',
719
724
  value: opacity,
720
- config: { max: 1, min: 0, step: 0.01 }
725
+ config: { max: 1, min: 0, step: 0.01 },
721
726
  },
722
727
  {
723
728
  name: 'line',
@@ -731,7 +736,7 @@ export const areaSeries = (
731
736
  tension,
732
737
  connectNulls,
733
738
  }),
734
- // lineLighter && lighter(lineLighter),
739
+ lineLighter && lighter(lineLighter),
735
740
  ].filter((item) => !!item),
736
741
  },
737
742
  label(areaLabel),
@@ -763,7 +768,7 @@ export const pieSeries = (
763
768
  displayName = defaultPieSeries.mapping.displayName,
764
769
  } = defaultPieSeries.mapping,
765
770
  color = defaultPieSeries.color,
766
- currentColor
771
+ currentColor,
767
772
  } = defaultPieSeries
768
773
  ) => ({
769
774
  name: name,
@@ -775,20 +780,21 @@ export const pieSeries = (
775
780
  displayName: currentColor != undefined ? '默认颜色' : '颜色',
776
781
  type: 'multicolor',
777
782
  value: multiColor(color),
783
+ markColorType: 'seriesGradient',
778
784
  },
779
785
  currentColor != undefined && {
780
786
  name: 'currentColor',
781
787
  displayName: '当前颜色',
782
- type: "multicolor",
783
- value: multiColor(currentColor)
784
- }
788
+ type: 'multicolor',
789
+ value: multiColor(currentColor),
790
+ },
785
791
  ].filter((item) => !!item),
786
792
  type: 'object',
787
793
  });
788
794
 
789
795
  const defaultPurePieSeries = {
790
796
  mapping: _mapping,
791
- color: "#fff"
797
+ color: '#fff',
792
798
  };
793
799
  export const purePieSeries = (
794
800
  name = Math.random() + '',
@@ -797,7 +803,7 @@ export const purePieSeries = (
797
803
  fieldName = defaultPurePieSeries.mapping.fieldName,
798
804
  displayName = defaultPurePieSeries.mapping.displayName,
799
805
  } = defaultPurePieSeries.mapping,
800
- color = defaultPurePieSeries.color
806
+ color = defaultPurePieSeries.color,
801
807
  } = defaultPurePieSeries
802
808
  ) => ({
803
809
  name: name,
@@ -809,7 +815,8 @@ export const purePieSeries = (
809
815
  displayName: '填充',
810
816
  type: 'color',
811
817
  value: color,
812
- }
818
+ markColorType: 'palette',
819
+ },
813
820
  ],
814
821
  type: 'object',
815
- });
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]],