@easyv/config 1.0.46 → 1.0.50
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/lib/label.js +9 -0
- package/lib/series.js +198 -6
- package/package.json +1 -1
- package/src/label.js +22 -13
- package/src/series.js +244 -61
package/lib/label.js
CHANGED
|
@@ -384,6 +384,7 @@ var defaultAxisLabel = {
|
|
|
384
384
|
angle: 0,
|
|
385
385
|
wordBreak: 'keep-all'
|
|
386
386
|
},
|
|
387
|
+
showLast: false,
|
|
387
388
|
translate: {
|
|
388
389
|
x: 0,
|
|
389
390
|
y: 0
|
|
@@ -412,6 +413,8 @@ var axisLabel = function axisLabel() {
|
|
|
412
413
|
angle = _ref4$appearance$angl === void 0 ? defaultAxisLabel.appearance.angle : _ref4$appearance$angl,
|
|
413
414
|
_ref4$appearance$word = _ref4$appearance.wordBreak,
|
|
414
415
|
wordBreak = _ref4$appearance$word === void 0 ? defaultAxisLabel.appearance.wordBreak : _ref4$appearance$word,
|
|
416
|
+
_ref4$showLast = _ref4.showLast,
|
|
417
|
+
showLast = _ref4$showLast === void 0 ? defaultAxisLabel.showLast : _ref4$showLast,
|
|
415
418
|
_ref4$translate = _ref4.translate;
|
|
416
419
|
_ref4$translate = _ref4$translate === void 0 ? defaultAxisLabel.translate : _ref4$translate;
|
|
417
420
|
var _ref4$translate$x = _ref4$translate.x,
|
|
@@ -595,6 +598,12 @@ var axisLabel = function axisLabel() {
|
|
|
595
598
|
}
|
|
596
599
|
}],
|
|
597
600
|
type: 'group'
|
|
601
|
+
}, {
|
|
602
|
+
name: 'showLast',
|
|
603
|
+
displayName: '显示最新',
|
|
604
|
+
value: showLast,
|
|
605
|
+
type: 'boolean',
|
|
606
|
+
tip: '显示返回最新数据的轴标签'
|
|
598
607
|
}, _objectSpread({
|
|
599
608
|
rule: [['show', '$eq', true]]
|
|
600
609
|
}, (0, _.translate)(labelTranslateX, labelTranslateY)), {
|
package/lib/series.js
CHANGED
|
@@ -18,7 +18,7 @@ var _mapping = {
|
|
|
18
18
|
var defaultBandSeries = {
|
|
19
19
|
mapping: _mapping,
|
|
20
20
|
yOrZ: 'y',
|
|
21
|
-
|
|
21
|
+
fillImage: 'components/static-image/superChart/pattern.png',
|
|
22
22
|
fill: {
|
|
23
23
|
type: 'linear',
|
|
24
24
|
pure: '#fff',
|
|
@@ -58,7 +58,12 @@ var defaultBandSeries = {
|
|
|
58
58
|
opacity: 1
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
},
|
|
62
|
+
size: {
|
|
63
|
+
width: 10,
|
|
64
|
+
height: 10
|
|
65
|
+
},
|
|
66
|
+
opacity: 0.65
|
|
62
67
|
};
|
|
63
68
|
|
|
64
69
|
var bandSeries = function bandSeries() {
|
|
@@ -76,11 +81,22 @@ var bandSeries = function bandSeries() {
|
|
|
76
81
|
yOrZ = _ref$yOrZ === void 0 ? defaultBandSeries.yOrZ : _ref$yOrZ,
|
|
77
82
|
stack = _ref.stack,
|
|
78
83
|
patternType = _ref.patternType,
|
|
84
|
+
fillType = _ref.fillType,
|
|
85
|
+
_ref$fillImage = _ref.fillImage,
|
|
86
|
+
fillImage = _ref$fillImage === void 0 ? defaultBandSeries.fillImage : _ref$fillImage,
|
|
79
87
|
patternWidth = _ref.patternWidth,
|
|
80
88
|
patternHeight = _ref.patternHeight,
|
|
81
89
|
patternImage = _ref.patternImage,
|
|
82
90
|
_ref$fill = _ref.fill,
|
|
83
91
|
fill = _ref$fill === void 0 ? defaultBandSeries.fill : _ref$fill,
|
|
92
|
+
_ref$size = _ref.size;
|
|
93
|
+
_ref$size = _ref$size === void 0 ? defaultBandSeries.size : _ref$size;
|
|
94
|
+
var _ref$size$width = _ref$size.width,
|
|
95
|
+
urlWidth = _ref$size$width === void 0 ? defaultBandSeries.size.width : _ref$size$width,
|
|
96
|
+
_ref$size$height = _ref$size.height,
|
|
97
|
+
urlHeight = _ref$size$height === void 0 ? defaultBandSeries.size.height : _ref$size$height,
|
|
98
|
+
_ref$opacity = _ref.opacity,
|
|
99
|
+
opacity = _ref$opacity === void 0 ? defaultBandSeries.opacity : _ref$opacity,
|
|
84
100
|
_ref$highlight = _ref.highlight;
|
|
85
101
|
_ref$highlight = _ref$highlight === void 0 ? defaultBandSeries.highlight : _ref$highlight;
|
|
86
102
|
var _ref$highlight$show = _ref$highlight.show,
|
|
@@ -114,7 +130,66 @@ var bandSeries = function bandSeries() {
|
|
|
114
130
|
displayName: '堆叠',
|
|
115
131
|
value: stack,
|
|
116
132
|
type: 'input'
|
|
117
|
-
}, {
|
|
133
|
+
}, fillType !== undefined && {
|
|
134
|
+
name: 'fillType',
|
|
135
|
+
displayName: '填充样式',
|
|
136
|
+
value: fillType,
|
|
137
|
+
type: 'radio',
|
|
138
|
+
config: {
|
|
139
|
+
options: [{
|
|
140
|
+
name: '颜色',
|
|
141
|
+
value: 'color'
|
|
142
|
+
}, {
|
|
143
|
+
name: '纹理',
|
|
144
|
+
value: 'pattern'
|
|
145
|
+
}]
|
|
146
|
+
}
|
|
147
|
+
}, fillType !== undefined && {
|
|
148
|
+
rule: [['fillType', '$eq', 'color']],
|
|
149
|
+
name: 'fill',
|
|
150
|
+
displayName: '颜色',
|
|
151
|
+
type: 'multicolor',
|
|
152
|
+
value: fill
|
|
153
|
+
}, fillType !== undefined && {
|
|
154
|
+
rule: [['fillType', '$eq', 'pattern']],
|
|
155
|
+
name: 'url',
|
|
156
|
+
displayName: '纹理图片',
|
|
157
|
+
type: 'uploadImage',
|
|
158
|
+
value: fillImage
|
|
159
|
+
}, fillType !== undefined && {
|
|
160
|
+
rule: [['fillType', '$eq', 'pattern']],
|
|
161
|
+
name: 'size',
|
|
162
|
+
displayName: '尺寸',
|
|
163
|
+
value: [{
|
|
164
|
+
name: 'width',
|
|
165
|
+
displayName: '宽度',
|
|
166
|
+
value: urlWidth,
|
|
167
|
+
config: {
|
|
168
|
+
span: 12,
|
|
169
|
+
suffix: 'W'
|
|
170
|
+
}
|
|
171
|
+
}, {
|
|
172
|
+
name: 'height',
|
|
173
|
+
displayName: '高度',
|
|
174
|
+
value: urlHeight,
|
|
175
|
+
config: {
|
|
176
|
+
span: 12,
|
|
177
|
+
suffix: 'H'
|
|
178
|
+
}
|
|
179
|
+
}],
|
|
180
|
+
type: 'group'
|
|
181
|
+
}, fillType !== undefined && {
|
|
182
|
+
rule: [['fillType', '$eq', 'pattern']],
|
|
183
|
+
type: "range",
|
|
184
|
+
name: "opacity",
|
|
185
|
+
displayName: "透明度",
|
|
186
|
+
value: opacity,
|
|
187
|
+
config: {
|
|
188
|
+
max: 1,
|
|
189
|
+
min: 0,
|
|
190
|
+
step: 0.01
|
|
191
|
+
}
|
|
192
|
+
}, (patternType !== undefined || fillType === undefined) && {
|
|
118
193
|
name: 'fill',
|
|
119
194
|
displayName: '颜色',
|
|
120
195
|
type: 'multicolor',
|
|
@@ -228,6 +303,13 @@ var defaultLineSeries = {
|
|
|
228
303
|
unitStep: 1
|
|
229
304
|
}
|
|
230
305
|
},
|
|
306
|
+
areaType: 'color',
|
|
307
|
+
size: {
|
|
308
|
+
width: 10,
|
|
309
|
+
height: 10
|
|
310
|
+
},
|
|
311
|
+
url: 'components/static-image/superChart/pattern.png',
|
|
312
|
+
opacity: 0.65,
|
|
231
313
|
areaColor: {
|
|
232
314
|
type: 'linear',
|
|
233
315
|
pure: '#fff',
|
|
@@ -259,7 +341,12 @@ var defaultIcon = {
|
|
|
259
341
|
radius: 6
|
|
260
342
|
},
|
|
261
343
|
color: '#1283E3',
|
|
262
|
-
radius: 4
|
|
344
|
+
radius: 4,
|
|
345
|
+
image: 'components/static-image/superChart/fang.png',
|
|
346
|
+
size: {
|
|
347
|
+
width: 10,
|
|
348
|
+
height: 10
|
|
349
|
+
}
|
|
263
350
|
};
|
|
264
351
|
|
|
265
352
|
var commonLine = function commonLine() {
|
|
@@ -399,7 +486,15 @@ var icon = function icon() {
|
|
|
399
486
|
_ref4$color = _ref4.color,
|
|
400
487
|
color = _ref4$color === void 0 ? defaultIcon.color : _ref4$color,
|
|
401
488
|
_ref4$radius = _ref4.radius,
|
|
402
|
-
radius = _ref4$radius === void 0 ? defaultIcon.radius : _ref4$radius
|
|
489
|
+
radius = _ref4$radius === void 0 ? defaultIcon.radius : _ref4$radius,
|
|
490
|
+
_ref4$image = _ref4.image,
|
|
491
|
+
image = _ref4$image === void 0 ? defaultIcon.image : _ref4$image,
|
|
492
|
+
_ref4$size = _ref4.size;
|
|
493
|
+
_ref4$size = _ref4$size === void 0 ? defaultIcon.size : _ref4$size;
|
|
494
|
+
var _ref4$size$width = _ref4$size.width,
|
|
495
|
+
imageWidth = _ref4$size$width === void 0 ? defaultIcon.size.width : _ref4$size$width,
|
|
496
|
+
_ref4$size$height = _ref4$size.height,
|
|
497
|
+
imageHeight = _ref4$size$height === void 0 ? defaultIcon.size.height : _ref4$size$height;
|
|
403
498
|
return {
|
|
404
499
|
name: 'icon',
|
|
405
500
|
displayName: '数据标记',
|
|
@@ -421,8 +516,39 @@ var icon = function icon() {
|
|
|
421
516
|
}, {
|
|
422
517
|
name: '双圆',
|
|
423
518
|
value: 'double'
|
|
519
|
+
}, {
|
|
520
|
+
name: '自定义',
|
|
521
|
+
value: 'custom'
|
|
424
522
|
}]
|
|
425
523
|
}
|
|
524
|
+
}, {
|
|
525
|
+
rule: [['show', '$eq', true], ['mode', '$eq', 'custom']],
|
|
526
|
+
name: 'image',
|
|
527
|
+
displayName: '图片',
|
|
528
|
+
value: image,
|
|
529
|
+
type: 'uploadImage'
|
|
530
|
+
}, {
|
|
531
|
+
rule: [['show', '$eq', true], ['mode', '$eq', 'custom']],
|
|
532
|
+
name: 'size',
|
|
533
|
+
displayName: '尺寸',
|
|
534
|
+
value: [{
|
|
535
|
+
name: 'width',
|
|
536
|
+
displayName: '宽度',
|
|
537
|
+
value: imageWidth,
|
|
538
|
+
config: {
|
|
539
|
+
span: 12,
|
|
540
|
+
suffix: 'W'
|
|
541
|
+
}
|
|
542
|
+
}, {
|
|
543
|
+
name: 'height',
|
|
544
|
+
displayName: '高度',
|
|
545
|
+
value: imageHeight,
|
|
546
|
+
config: {
|
|
547
|
+
span: 12,
|
|
548
|
+
suffix: 'H'
|
|
549
|
+
}
|
|
550
|
+
}],
|
|
551
|
+
type: 'group'
|
|
426
552
|
}, {
|
|
427
553
|
rule: [['show', '$eq', true], ['mode', '$eq', 'double']],
|
|
428
554
|
name: 'inner',
|
|
@@ -559,8 +685,20 @@ var areaSeries = function areaSeries() {
|
|
|
559
685
|
lineLighter = _ref6$line.lighter,
|
|
560
686
|
_ref6$label = _ref6.label,
|
|
561
687
|
areaLabel = _ref6$label === void 0 ? defaultLineSeries.label : _ref6$label,
|
|
688
|
+
_ref6$areaType = _ref6.areaType,
|
|
689
|
+
areaType = _ref6$areaType === void 0 ? defaultLineSeries.areaType : _ref6$areaType,
|
|
562
690
|
_ref6$areaColor = _ref6.areaColor,
|
|
563
|
-
areaColor = _ref6$areaColor === void 0 ? defaultLineSeries.areaColor : _ref6$areaColor
|
|
691
|
+
areaColor = _ref6$areaColor === void 0 ? defaultLineSeries.areaColor : _ref6$areaColor,
|
|
692
|
+
_ref6$url = _ref6.url,
|
|
693
|
+
url = _ref6$url === void 0 ? defaultLineSeries.url : _ref6$url,
|
|
694
|
+
_ref6$size = _ref6.size;
|
|
695
|
+
_ref6$size = _ref6$size === void 0 ? defaultLineSeries.size : _ref6$size;
|
|
696
|
+
var _ref6$size$width = _ref6$size.width,
|
|
697
|
+
urlWidth = _ref6$size$width === void 0 ? defaultLineSeries.size.width : _ref6$size$width,
|
|
698
|
+
_ref6$size$height = _ref6$size.height,
|
|
699
|
+
urlHeight = _ref6$size$height === void 0 ? defaultLineSeries.size.height : _ref6$size$height,
|
|
700
|
+
_ref6$opacity = _ref6.opacity,
|
|
701
|
+
opacity = _ref6$opacity === void 0 ? defaultLineSeries.opacity : _ref6$opacity;
|
|
564
702
|
return {
|
|
565
703
|
name: name,
|
|
566
704
|
displayName: '系列',
|
|
@@ -582,10 +720,64 @@ var areaSeries = function areaSeries() {
|
|
|
582
720
|
}]
|
|
583
721
|
}
|
|
584
722
|
}, {
|
|
723
|
+
name: "areaType",
|
|
724
|
+
displayName: "区域样式",
|
|
725
|
+
value: areaType,
|
|
726
|
+
type: 'radio',
|
|
727
|
+
config: {
|
|
728
|
+
options: [{
|
|
729
|
+
name: "颜色",
|
|
730
|
+
value: "color"
|
|
731
|
+
}, {
|
|
732
|
+
name: "纹理",
|
|
733
|
+
value: "pattern"
|
|
734
|
+
}]
|
|
735
|
+
}
|
|
736
|
+
}, {
|
|
737
|
+
rule: [['areaType', '$eq', 'color']],
|
|
585
738
|
name: 'areaColor',
|
|
586
739
|
displayName: '区域颜色',
|
|
587
740
|
type: 'multicolor',
|
|
588
741
|
value: areaColor
|
|
742
|
+
}, {
|
|
743
|
+
rule: [['areaType', '$eq', 'pattern']],
|
|
744
|
+
name: "url",
|
|
745
|
+
displayName: "纹理图片",
|
|
746
|
+
value: url,
|
|
747
|
+
type: "uploadImage"
|
|
748
|
+
}, {
|
|
749
|
+
rule: [['areaType', '$eq', 'pattern']],
|
|
750
|
+
name: 'size',
|
|
751
|
+
displayName: '尺寸',
|
|
752
|
+
value: [{
|
|
753
|
+
name: 'width',
|
|
754
|
+
displayName: '宽度',
|
|
755
|
+
value: urlWidth,
|
|
756
|
+
config: {
|
|
757
|
+
span: 12,
|
|
758
|
+
suffix: 'W'
|
|
759
|
+
}
|
|
760
|
+
}, {
|
|
761
|
+
name: 'height',
|
|
762
|
+
displayName: '高度',
|
|
763
|
+
value: urlHeight,
|
|
764
|
+
config: {
|
|
765
|
+
span: 12,
|
|
766
|
+
suffix: 'H'
|
|
767
|
+
}
|
|
768
|
+
}],
|
|
769
|
+
type: 'group'
|
|
770
|
+
}, {
|
|
771
|
+
rule: [['areaType', '$eq', 'pattern']],
|
|
772
|
+
type: "range",
|
|
773
|
+
name: "opacity",
|
|
774
|
+
displayName: "透明度",
|
|
775
|
+
value: opacity,
|
|
776
|
+
config: {
|
|
777
|
+
max: 1,
|
|
778
|
+
min: 0,
|
|
779
|
+
step: 0.01
|
|
780
|
+
}
|
|
589
781
|
}, {
|
|
590
782
|
name: 'line',
|
|
591
783
|
displayName: '折线',
|
package/package.json
CHANGED
package/src/label.js
CHANGED
|
@@ -155,11 +155,11 @@ export const labelOfPie = ({
|
|
|
155
155
|
step: 1,
|
|
156
156
|
},
|
|
157
157
|
},
|
|
158
|
-
lineColor !==undefined && {
|
|
159
|
-
name:"lineColor",
|
|
160
|
-
displayName:"线颜色",
|
|
161
|
-
value:lineColor,
|
|
162
|
-
type:"color"
|
|
158
|
+
lineColor !== undefined && {
|
|
159
|
+
name: "lineColor",
|
|
160
|
+
displayName: "线颜色",
|
|
161
|
+
value: lineColor,
|
|
162
|
+
type: "color"
|
|
163
163
|
},
|
|
164
164
|
{
|
|
165
165
|
rule: [['show', '$eq', true]],
|
|
@@ -295,9 +295,9 @@ const defaultLabelOfRose = {
|
|
|
295
295
|
font: defaultFont,
|
|
296
296
|
gap: 10,
|
|
297
297
|
}
|
|
298
|
-
export const labelOfRose=({
|
|
298
|
+
export const labelOfRose = ({
|
|
299
299
|
show = defaultLabelOfRose.show,
|
|
300
|
-
font:labelFont = defaultLabelOfRose.font,
|
|
300
|
+
font: labelFont = defaultLabelOfRose.font,
|
|
301
301
|
gap = defaultLabelOfRose.gap
|
|
302
302
|
} = defaultLabelOfRose) => ({
|
|
303
303
|
name: 'label',
|
|
@@ -318,12 +318,12 @@ export const labelOfRose=({
|
|
|
318
318
|
},
|
|
319
319
|
{
|
|
320
320
|
...showRule(),
|
|
321
|
-
name:"gap",
|
|
322
|
-
displayName:"间距",
|
|
323
|
-
value:gap,
|
|
324
|
-
type:"number",
|
|
325
|
-
config:{
|
|
326
|
-
suffix:"px"
|
|
321
|
+
name: "gap",
|
|
322
|
+
displayName: "间距",
|
|
323
|
+
value: gap,
|
|
324
|
+
type: "number",
|
|
325
|
+
config: {
|
|
326
|
+
suffix: "px"
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
],
|
|
@@ -333,6 +333,7 @@ const defaultAxisLabel = {
|
|
|
333
333
|
show: true,
|
|
334
334
|
format: { type: 'date', showType: 'MM月' },
|
|
335
335
|
appearance: { count: 3, angle: 0, wordBreak: 'keep-all' },
|
|
336
|
+
showLast: false,
|
|
336
337
|
translate: { x: 0, y: 0 },
|
|
337
338
|
font: font({ color: 'rgba(230, 247, 255, 1)' }),
|
|
338
339
|
};
|
|
@@ -347,6 +348,7 @@ export const axisLabel = ({
|
|
|
347
348
|
angle = defaultAxisLabel.appearance.angle,
|
|
348
349
|
wordBreak = defaultAxisLabel.appearance.wordBreak,
|
|
349
350
|
} = defaultAxisLabel.appearance,
|
|
351
|
+
showLast = defaultAxisLabel.showLast,
|
|
350
352
|
translate: {
|
|
351
353
|
x: labelTranslateX = defaultAxisLabel.translate.x,
|
|
352
354
|
y: labelTranslateY = defaultAxisLabel.translate.y,
|
|
@@ -572,6 +574,13 @@ export const axisLabel = ({
|
|
|
572
574
|
],
|
|
573
575
|
type: 'group',
|
|
574
576
|
},
|
|
577
|
+
{
|
|
578
|
+
name: 'showLast',
|
|
579
|
+
displayName: '显示最新',
|
|
580
|
+
value: showLast,
|
|
581
|
+
type: 'boolean',
|
|
582
|
+
tip: '显示返回最新数据的轴标签',
|
|
583
|
+
},
|
|
575
584
|
{
|
|
576
585
|
rule: [['show', '$eq', true]],
|
|
577
586
|
...translate(labelTranslateX, labelTranslateY),
|
package/src/series.js
CHANGED
|
@@ -5,7 +5,7 @@ const _mapping = { fieldName: '', displayName: '' };
|
|
|
5
5
|
const defaultBandSeries = {
|
|
6
6
|
mapping: _mapping,
|
|
7
7
|
yOrZ: 'y',
|
|
8
|
-
|
|
8
|
+
fillImage: 'components/static-image/superChart/pattern.png',
|
|
9
9
|
fill: {
|
|
10
10
|
type: 'linear',
|
|
11
11
|
pure: '#fff',
|
|
@@ -36,6 +36,11 @@ const defaultBandSeries = {
|
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
|
+
size: {
|
|
40
|
+
width: 10,
|
|
41
|
+
height: 10
|
|
42
|
+
},
|
|
43
|
+
opacity: 0.65
|
|
39
44
|
};
|
|
40
45
|
|
|
41
46
|
export const bandSeries = (
|
|
@@ -48,10 +53,17 @@ export const bandSeries = (
|
|
|
48
53
|
yOrZ = defaultBandSeries.yOrZ,
|
|
49
54
|
stack,
|
|
50
55
|
patternType,
|
|
56
|
+
fillType,
|
|
57
|
+
fillImage = defaultBandSeries.fillImage,
|
|
51
58
|
patternWidth,
|
|
52
59
|
patternHeight,
|
|
53
60
|
patternImage,
|
|
54
61
|
fill = defaultBandSeries.fill,
|
|
62
|
+
size: {
|
|
63
|
+
width: urlWidth = defaultBandSeries.size.width,
|
|
64
|
+
height: urlHeight = defaultBandSeries.size.height
|
|
65
|
+
} = defaultBandSeries.size,
|
|
66
|
+
opacity = defaultBandSeries.opacity,
|
|
55
67
|
highlight: {
|
|
56
68
|
show: showHighlight = defaultBandSeries.highlight.show,
|
|
57
69
|
extent: highlightExtent = defaultBandSeries.highlight.extent,
|
|
@@ -82,7 +94,61 @@ export const bandSeries = (
|
|
|
82
94
|
value: stack,
|
|
83
95
|
type: 'input',
|
|
84
96
|
},
|
|
85
|
-
{
|
|
97
|
+
fillType !== undefined && {
|
|
98
|
+
name: 'fillType',
|
|
99
|
+
displayName: '填充样式',
|
|
100
|
+
value: fillType,
|
|
101
|
+
type: 'radio',
|
|
102
|
+
config: {
|
|
103
|
+
options: [
|
|
104
|
+
{ name: '颜色', value: 'color' },
|
|
105
|
+
{ name: '纹理', value: 'pattern' },
|
|
106
|
+
],
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
fillType !== undefined && {
|
|
110
|
+
rule: [['fillType', '$eq', 'color']],
|
|
111
|
+
name: 'fill',
|
|
112
|
+
displayName: '颜色',
|
|
113
|
+
type: 'multicolor',
|
|
114
|
+
value: fill,
|
|
115
|
+
},
|
|
116
|
+
fillType !== undefined && {
|
|
117
|
+
rule: [['fillType', '$eq', 'pattern']],
|
|
118
|
+
name: 'url',
|
|
119
|
+
displayName: '纹理图片',
|
|
120
|
+
type: 'uploadImage',
|
|
121
|
+
value: fillImage,
|
|
122
|
+
},
|
|
123
|
+
fillType !== undefined && {
|
|
124
|
+
rule: [['fillType', '$eq', 'pattern']],
|
|
125
|
+
name: 'size',
|
|
126
|
+
displayName: '尺寸',
|
|
127
|
+
value: [
|
|
128
|
+
{
|
|
129
|
+
name: 'width',
|
|
130
|
+
displayName: '宽度',
|
|
131
|
+
value: urlWidth,
|
|
132
|
+
config: { span: 12, suffix: 'W' },
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
name: 'height',
|
|
136
|
+
displayName: '高度',
|
|
137
|
+
value: urlHeight,
|
|
138
|
+
config: { span: 12, suffix: 'H' },
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
type: 'group',
|
|
142
|
+
},
|
|
143
|
+
fillType !== undefined && {
|
|
144
|
+
rule: [['fillType', '$eq', 'pattern']],
|
|
145
|
+
type: "range",
|
|
146
|
+
name: "opacity",
|
|
147
|
+
displayName: "透明度",
|
|
148
|
+
value: opacity,
|
|
149
|
+
config: { max: 1, min: 0, step: 0.01 }
|
|
150
|
+
},
|
|
151
|
+
(patternType !== undefined || fillType === undefined) && {
|
|
86
152
|
name: 'fill',
|
|
87
153
|
displayName: '颜色',
|
|
88
154
|
type: 'multicolor',
|
|
@@ -192,6 +258,13 @@ const defaultLineSeries = {
|
|
|
192
258
|
unitStep: 1,
|
|
193
259
|
},
|
|
194
260
|
},
|
|
261
|
+
areaType: 'color',
|
|
262
|
+
size: {
|
|
263
|
+
width: 10,
|
|
264
|
+
height: 10
|
|
265
|
+
},
|
|
266
|
+
url: 'components/static-image/superChart/pattern.png',
|
|
267
|
+
opacity: 0.65,
|
|
195
268
|
areaColor: {
|
|
196
269
|
type: 'linear',
|
|
197
270
|
pure: '#fff',
|
|
@@ -213,6 +286,11 @@ const defaultIcon = {
|
|
|
213
286
|
outer: { color: 'rgba(24,144,255,0.4)', radius: 6 },
|
|
214
287
|
color: '#1283E3',
|
|
215
288
|
radius: 4,
|
|
289
|
+
image: 'components/static-image/superChart/fang.png',
|
|
290
|
+
size: {
|
|
291
|
+
width: 10,
|
|
292
|
+
height: 10
|
|
293
|
+
}
|
|
216
294
|
};
|
|
217
295
|
|
|
218
296
|
const commonLine = (
|
|
@@ -225,64 +303,64 @@ const commonLine = (
|
|
|
225
303
|
connectNulls = defaultLineSeries.line.connectNulls,
|
|
226
304
|
} = defaultLineSeries.line
|
|
227
305
|
) => [
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
+
},
|
|
244
323
|
},
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
type: 'color',
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
name: 'lineWidth',
|
|
254
|
-
displayName: '粗细',
|
|
255
|
-
value: lineWidth,
|
|
256
|
-
type: 'input',
|
|
257
|
-
config: {
|
|
258
|
-
suffix: 'px',
|
|
324
|
+
{
|
|
325
|
+
name: 'color',
|
|
326
|
+
displayName: '颜色',
|
|
327
|
+
value: color,
|
|
328
|
+
type: 'color',
|
|
259
329
|
},
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
rule: [['curve', '$eq', true]],
|
|
269
|
-
name: 'tension',
|
|
270
|
-
displayName: '曲线张力',
|
|
271
|
-
value: tension,
|
|
272
|
-
type: 'range',
|
|
273
|
-
config: {
|
|
274
|
-
min: 0,
|
|
275
|
-
max: 1,
|
|
276
|
-
step: 0.1,
|
|
330
|
+
{
|
|
331
|
+
name: 'lineWidth',
|
|
332
|
+
displayName: '粗细',
|
|
333
|
+
value: lineWidth,
|
|
334
|
+
type: 'input',
|
|
335
|
+
config: {
|
|
336
|
+
suffix: 'px',
|
|
337
|
+
},
|
|
277
338
|
},
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
]
|
|
339
|
+
{
|
|
340
|
+
name: 'curve',
|
|
341
|
+
displayName: '曲线',
|
|
342
|
+
value: curve,
|
|
343
|
+
type: 'boolean',
|
|
344
|
+
},
|
|
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
|
+
},
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
name: 'connectNulls',
|
|
359
|
+
displayName: 'null值连接',
|
|
360
|
+
value: connectNulls,
|
|
361
|
+
type: 'boolean',
|
|
362
|
+
},
|
|
363
|
+
];
|
|
286
364
|
|
|
287
365
|
const lighter = (
|
|
288
366
|
{
|
|
@@ -346,6 +424,11 @@ const icon = ({
|
|
|
346
424
|
} = defaultIcon.outer,
|
|
347
425
|
color = defaultIcon.color,
|
|
348
426
|
radius = defaultIcon.radius,
|
|
427
|
+
image = defaultIcon.image,
|
|
428
|
+
size: {
|
|
429
|
+
width: imageWidth = defaultIcon.size.width,
|
|
430
|
+
height: imageHeight = defaultIcon.size.height
|
|
431
|
+
} = defaultIcon.size
|
|
349
432
|
} = defaultIcon) => ({
|
|
350
433
|
name: 'icon',
|
|
351
434
|
displayName: '数据标记',
|
|
@@ -372,9 +455,52 @@ const icon = ({
|
|
|
372
455
|
name: '双圆',
|
|
373
456
|
value: 'double',
|
|
374
457
|
},
|
|
458
|
+
{
|
|
459
|
+
name: '自定义',
|
|
460
|
+
value: 'custom',
|
|
461
|
+
},
|
|
375
462
|
],
|
|
376
463
|
},
|
|
377
464
|
},
|
|
465
|
+
{
|
|
466
|
+
rule: [
|
|
467
|
+
['show', '$eq', true],
|
|
468
|
+
['mode', '$eq', 'custom'],
|
|
469
|
+
],
|
|
470
|
+
name: 'image',
|
|
471
|
+
displayName: '图片',
|
|
472
|
+
value: image,
|
|
473
|
+
type: 'uploadImage',
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
rule: [
|
|
477
|
+
['show', '$eq', true],
|
|
478
|
+
['mode', '$eq', 'custom'],
|
|
479
|
+
],
|
|
480
|
+
name: 'size',
|
|
481
|
+
displayName: '尺寸',
|
|
482
|
+
value: [
|
|
483
|
+
{
|
|
484
|
+
name: 'width',
|
|
485
|
+
displayName: '宽度',
|
|
486
|
+
value: imageWidth,
|
|
487
|
+
config: {
|
|
488
|
+
span: 12,
|
|
489
|
+
suffix: 'W',
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
name: 'height',
|
|
494
|
+
displayName: '高度',
|
|
495
|
+
value: imageHeight,
|
|
496
|
+
config: {
|
|
497
|
+
span: 12,
|
|
498
|
+
suffix: 'H',
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
],
|
|
502
|
+
type: 'group',
|
|
503
|
+
},
|
|
378
504
|
{
|
|
379
505
|
rule: [
|
|
380
506
|
['show', '$eq', true],
|
|
@@ -511,7 +637,14 @@ export const areaSeries = (
|
|
|
511
637
|
lighter: lineLighter,
|
|
512
638
|
} = defaultLineSeries.line,
|
|
513
639
|
label: areaLabel = defaultLineSeries.label,
|
|
640
|
+
areaType = defaultLineSeries.areaType,
|
|
514
641
|
areaColor = defaultLineSeries.areaColor,
|
|
642
|
+
url = defaultLineSeries.url,
|
|
643
|
+
size: {
|
|
644
|
+
width: urlWidth = defaultLineSeries.size.width,
|
|
645
|
+
height: urlHeight = defaultLineSeries.size.height
|
|
646
|
+
} = defaultLineSeries.size,
|
|
647
|
+
opacity = defaultLineSeries.opacity
|
|
515
648
|
} = defaultLineSeries
|
|
516
649
|
) => ({
|
|
517
650
|
name,
|
|
@@ -531,11 +664,61 @@ export const areaSeries = (
|
|
|
531
664
|
},
|
|
532
665
|
},
|
|
533
666
|
{
|
|
667
|
+
name: "areaType",
|
|
668
|
+
displayName: "区域样式",
|
|
669
|
+
value: areaType,
|
|
670
|
+
type: 'radio',
|
|
671
|
+
config: {
|
|
672
|
+
options: [
|
|
673
|
+
{ name: "颜色", value: "color" },
|
|
674
|
+
{ name: "纹理", value: "pattern" }
|
|
675
|
+
]
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
rule: [['areaType', '$eq', 'color']],
|
|
534
680
|
name: 'areaColor',
|
|
535
681
|
displayName: '区域颜色',
|
|
536
682
|
type: 'multicolor',
|
|
537
683
|
value: areaColor,
|
|
538
684
|
},
|
|
685
|
+
{
|
|
686
|
+
rule: [
|
|
687
|
+
['areaType', '$eq', 'pattern']
|
|
688
|
+
],
|
|
689
|
+
name: "url",
|
|
690
|
+
displayName: "纹理图片",
|
|
691
|
+
value: url,
|
|
692
|
+
type: "uploadImage"
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
rule: [['areaType', '$eq', 'pattern']],
|
|
696
|
+
name: 'size',
|
|
697
|
+
displayName: '尺寸',
|
|
698
|
+
value: [
|
|
699
|
+
{
|
|
700
|
+
name: 'width',
|
|
701
|
+
displayName: '宽度',
|
|
702
|
+
value: urlWidth,
|
|
703
|
+
config: { span: 12, suffix: 'W' },
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
name: 'height',
|
|
707
|
+
displayName: '高度',
|
|
708
|
+
value: urlHeight,
|
|
709
|
+
config: { span: 12, suffix: 'H' },
|
|
710
|
+
},
|
|
711
|
+
],
|
|
712
|
+
type: 'group',
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
rule: [['areaType', '$eq', 'pattern']],
|
|
716
|
+
type: "range",
|
|
717
|
+
name: "opacity",
|
|
718
|
+
displayName: "透明度",
|
|
719
|
+
value: opacity,
|
|
720
|
+
config: { max: 1, min: 0, step: 0.01 }
|
|
721
|
+
},
|
|
539
722
|
{
|
|
540
723
|
name: 'line',
|
|
541
724
|
displayName: '折线',
|
|
@@ -589,17 +772,17 @@ export const pieSeries = (
|
|
|
589
772
|
mapping({ fieldName, displayName }),
|
|
590
773
|
{
|
|
591
774
|
name: 'color',
|
|
592
|
-
displayName: currentColor !=undefined?'默认颜色':'颜色',
|
|
775
|
+
displayName: currentColor != undefined ? '默认颜色' : '颜色',
|
|
593
776
|
type: 'multicolor',
|
|
594
777
|
value: multiColor(color),
|
|
595
778
|
},
|
|
596
|
-
currentColor !=undefined && {
|
|
779
|
+
currentColor != undefined && {
|
|
597
780
|
name: 'currentColor',
|
|
598
781
|
displayName: '当前颜色',
|
|
599
|
-
type:"multicolor",
|
|
782
|
+
type: "multicolor",
|
|
600
783
|
value: multiColor(currentColor)
|
|
601
784
|
}
|
|
602
|
-
].filter((item)
|
|
785
|
+
].filter((item) => !!item),
|
|
603
786
|
type: 'object',
|
|
604
787
|
});
|
|
605
788
|
|