@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/CHANGELOG.md +9 -0
- package/lib/animation.js +72 -36
- 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 +36 -28
- package/lib/tickLine.js +2 -1
- package/lib/tooltip.js +8 -4
- package/lib/unit.js +2 -1
- package/package.json +12 -3
- package/src/animation.js +61 -29
- 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 +102 -95
- package/src/tickLine.js +1 -0
- package/src/tooltip.js +4 -0
- package/src/unit.js +1 -0
package/lib/series.js
CHANGED
|
@@ -149,7 +149,8 @@ var bandSeries = function bandSeries() {
|
|
|
149
149
|
name: 'fill',
|
|
150
150
|
displayName: '颜色',
|
|
151
151
|
type: 'multicolor',
|
|
152
|
-
value: fill
|
|
152
|
+
value: fill,
|
|
153
|
+
markColorType: 'seriesGradient'
|
|
153
154
|
}, fillType !== undefined && {
|
|
154
155
|
rule: [['fillType', '$eq', 'pattern']],
|
|
155
156
|
name: 'url',
|
|
@@ -180,9 +181,9 @@ var bandSeries = function bandSeries() {
|
|
|
180
181
|
type: 'group'
|
|
181
182
|
}, fillType !== undefined && {
|
|
182
183
|
rule: [['fillType', '$eq', 'pattern']],
|
|
183
|
-
type:
|
|
184
|
-
name:
|
|
185
|
-
displayName:
|
|
184
|
+
type: 'range',
|
|
185
|
+
name: 'opacity',
|
|
186
|
+
displayName: '透明度',
|
|
186
187
|
value: opacity,
|
|
187
188
|
config: {
|
|
188
189
|
max: 1,
|
|
@@ -193,7 +194,8 @@ var bandSeries = function bandSeries() {
|
|
|
193
194
|
name: 'fill',
|
|
194
195
|
displayName: '颜色',
|
|
195
196
|
type: 'multicolor',
|
|
196
|
-
value: fill
|
|
197
|
+
value: fill,
|
|
198
|
+
markColorType: 'seriesGradient'
|
|
197
199
|
}, patternType !== undefined && {
|
|
198
200
|
name: 'patternType',
|
|
199
201
|
displayName: '纹理类型',
|
|
@@ -331,7 +333,7 @@ var defaultLineSeries = {
|
|
|
331
333
|
};
|
|
332
334
|
var defaultIcon = {
|
|
333
335
|
show: true,
|
|
334
|
-
mode: '
|
|
336
|
+
mode: 'single',
|
|
335
337
|
inner: {
|
|
336
338
|
color: '#83C4FF',
|
|
337
339
|
radius: 3
|
|
@@ -382,7 +384,8 @@ var commonLine = function commonLine() {
|
|
|
382
384
|
name: 'color',
|
|
383
385
|
displayName: '颜色',
|
|
384
386
|
value: color,
|
|
385
|
-
type: 'color'
|
|
387
|
+
type: 'color',
|
|
388
|
+
markColorType: 'palette'
|
|
386
389
|
}, {
|
|
387
390
|
name: 'lineWidth',
|
|
388
391
|
displayName: '粗细',
|
|
@@ -441,7 +444,8 @@ var lighter = function lighter() {
|
|
|
441
444
|
name: 'fill',
|
|
442
445
|
displayName: '颜色',
|
|
443
446
|
type: 'multicolor',
|
|
444
|
-
value: fill
|
|
447
|
+
value: fill,
|
|
448
|
+
markColorType: 'seriesGradient'
|
|
445
449
|
}, {
|
|
446
450
|
rule: [['show', '$eq', true]],
|
|
447
451
|
name: 'length',
|
|
@@ -592,7 +596,8 @@ var icon = function icon() {
|
|
|
592
596
|
name: 'color',
|
|
593
597
|
displayName: '颜色',
|
|
594
598
|
value: color,
|
|
595
|
-
type: 'color'
|
|
599
|
+
type: 'color',
|
|
600
|
+
markColorType: 'palette'
|
|
596
601
|
}, {
|
|
597
602
|
rule: [['show', '$eq', true], ['mode', '$eq', 'single']],
|
|
598
603
|
name: 'radius',
|
|
@@ -720,17 +725,17 @@ var areaSeries = function areaSeries() {
|
|
|
720
725
|
}]
|
|
721
726
|
}
|
|
722
727
|
}, {
|
|
723
|
-
name:
|
|
724
|
-
displayName:
|
|
728
|
+
name: 'areaType',
|
|
729
|
+
displayName: '区域样式',
|
|
725
730
|
value: areaType,
|
|
726
731
|
type: 'radio',
|
|
727
732
|
config: {
|
|
728
733
|
options: [{
|
|
729
|
-
name:
|
|
730
|
-
value:
|
|
734
|
+
name: '颜色',
|
|
735
|
+
value: 'color'
|
|
731
736
|
}, {
|
|
732
|
-
name:
|
|
733
|
-
value:
|
|
737
|
+
name: '纹理',
|
|
738
|
+
value: 'pattern'
|
|
734
739
|
}]
|
|
735
740
|
}
|
|
736
741
|
}, {
|
|
@@ -738,13 +743,14 @@ var areaSeries = function areaSeries() {
|
|
|
738
743
|
name: 'areaColor',
|
|
739
744
|
displayName: '区域颜色',
|
|
740
745
|
type: 'multicolor',
|
|
741
|
-
value: areaColor
|
|
746
|
+
value: areaColor,
|
|
747
|
+
markColorType: 'seriesGradient'
|
|
742
748
|
}, {
|
|
743
749
|
rule: [['areaType', '$eq', 'pattern']],
|
|
744
|
-
name:
|
|
745
|
-
displayName:
|
|
750
|
+
name: 'url',
|
|
751
|
+
displayName: '纹理图片',
|
|
746
752
|
value: url,
|
|
747
|
-
type:
|
|
753
|
+
type: 'uploadImage'
|
|
748
754
|
}, {
|
|
749
755
|
rule: [['areaType', '$eq', 'pattern']],
|
|
750
756
|
name: 'size',
|
|
@@ -769,9 +775,9 @@ var areaSeries = function areaSeries() {
|
|
|
769
775
|
type: 'group'
|
|
770
776
|
}, {
|
|
771
777
|
rule: [['areaType', '$eq', 'pattern']],
|
|
772
|
-
type:
|
|
773
|
-
name:
|
|
774
|
-
displayName:
|
|
778
|
+
type: 'range',
|
|
779
|
+
name: 'opacity',
|
|
780
|
+
displayName: '透明度',
|
|
775
781
|
value: opacity,
|
|
776
782
|
config: {
|
|
777
783
|
max: 1,
|
|
@@ -781,14 +787,14 @@ var areaSeries = function areaSeries() {
|
|
|
781
787
|
}, {
|
|
782
788
|
name: 'line',
|
|
783
789
|
displayName: '折线',
|
|
784
|
-
value: (0, _toConsumableArray2["default"])(commonLine({
|
|
790
|
+
value: [].concat((0, _toConsumableArray2["default"])(commonLine({
|
|
785
791
|
type: type,
|
|
786
792
|
color: color,
|
|
787
793
|
lineWidth: lineWidth,
|
|
788
794
|
curve: curve,
|
|
789
795
|
tension: tension,
|
|
790
796
|
connectNulls: connectNulls
|
|
791
|
-
})).filter(function (item) {
|
|
797
|
+
})), [lineLighter && lighter(lineLighter)]).filter(function (item) {
|
|
792
798
|
return !!item;
|
|
793
799
|
})
|
|
794
800
|
}, (0, _.label)(areaLabel)],
|
|
@@ -843,11 +849,12 @@ var pieSeries = function pieSeries() {
|
|
|
843
849
|
name: 'color',
|
|
844
850
|
displayName: currentColor != undefined ? '默认颜色' : '颜色',
|
|
845
851
|
type: 'multicolor',
|
|
846
|
-
value: (0, _.multiColor)(color)
|
|
852
|
+
value: (0, _.multiColor)(color),
|
|
853
|
+
markColorType: 'seriesGradient'
|
|
847
854
|
}, currentColor != undefined && {
|
|
848
855
|
name: 'currentColor',
|
|
849
856
|
displayName: '当前颜色',
|
|
850
|
-
type:
|
|
857
|
+
type: 'multicolor',
|
|
851
858
|
value: (0, _.multiColor)(currentColor)
|
|
852
859
|
}].filter(function (item) {
|
|
853
860
|
return !!item;
|
|
@@ -859,7 +866,7 @@ var pieSeries = function pieSeries() {
|
|
|
859
866
|
exports.pieSeries = pieSeries;
|
|
860
867
|
var defaultPurePieSeries = {
|
|
861
868
|
mapping: _mapping,
|
|
862
|
-
color:
|
|
869
|
+
color: '#fff'
|
|
863
870
|
};
|
|
864
871
|
|
|
865
872
|
var purePieSeries = function purePieSeries() {
|
|
@@ -885,7 +892,8 @@ var purePieSeries = function purePieSeries() {
|
|
|
885
892
|
name: 'color',
|
|
886
893
|
displayName: '填充',
|
|
887
894
|
type: 'color',
|
|
888
|
-
value: color
|
|
895
|
+
value: color,
|
|
896
|
+
markColorType: 'palette'
|
|
889
897
|
}],
|
|
890
898
|
type: 'object'
|
|
891
899
|
};
|
package/lib/tickLine.js
CHANGED
package/lib/tooltip.js
CHANGED
|
@@ -249,7 +249,8 @@ var _default = function _default() {
|
|
|
249
249
|
italic: xAxisItalic,
|
|
250
250
|
letterSpacing: xAxisLetterSpacing
|
|
251
251
|
},
|
|
252
|
-
type: 'textStyle'
|
|
252
|
+
type: 'textStyle',
|
|
253
|
+
markColorType: 'textColor'
|
|
253
254
|
}, {
|
|
254
255
|
name: 'align',
|
|
255
256
|
displayName: '对齐方式',
|
|
@@ -296,7 +297,8 @@ var _default = function _default() {
|
|
|
296
297
|
italic: nameItalic,
|
|
297
298
|
letterSpacing: nameLetterSpacing
|
|
298
299
|
},
|
|
299
|
-
type: 'textStyle'
|
|
300
|
+
type: 'textStyle',
|
|
301
|
+
markColorType: 'textColor'
|
|
300
302
|
}, {
|
|
301
303
|
name: 'value',
|
|
302
304
|
displayName: '系列值',
|
|
@@ -308,7 +310,8 @@ var _default = function _default() {
|
|
|
308
310
|
italic: valueFontItalic,
|
|
309
311
|
letterSpacing: valueFontLetterSpacing
|
|
310
312
|
},
|
|
311
|
-
type: 'textStyle'
|
|
313
|
+
type: 'textStyle',
|
|
314
|
+
markColorType: 'textColor'
|
|
312
315
|
}, {
|
|
313
316
|
name: 'suffix',
|
|
314
317
|
displayName: '后缀',
|
|
@@ -388,7 +391,8 @@ var _default = function _default() {
|
|
|
388
391
|
italic: suffixItalic,
|
|
389
392
|
letterSpacing: suffixLetterSpacing
|
|
390
393
|
},
|
|
391
|
-
type: 'textStyle'
|
|
394
|
+
type: 'textStyle',
|
|
395
|
+
markColorType: 'textColor'
|
|
392
396
|
}, (0, _.translate)(x, y)]
|
|
393
397
|
}]
|
|
394
398
|
}]
|
package/lib/unit.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easyv/config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.55",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"make": "babel src -d lib"
|
|
7
|
+
"make": "babel src -d lib",
|
|
8
|
+
"release": "standard-version",
|
|
9
|
+
"publish": "npm run make && npm run release"
|
|
8
10
|
},
|
|
9
11
|
"keywords": [],
|
|
10
12
|
"author": "",
|
|
@@ -17,7 +19,14 @@
|
|
|
17
19
|
"@babel/plugin-transform-runtime": "^7.11.5",
|
|
18
20
|
"@babel/preset-env": "^7.11.5",
|
|
19
21
|
"@babel/preset-react": "^7.10.4",
|
|
22
|
+
"@babel/runtime": "^7.17.7",
|
|
20
23
|
"babel-plugin-transform-import-styles": "0.0.11",
|
|
21
|
-
"babel-preset-env": "^1.7.0"
|
|
24
|
+
"babel-preset-env": "^1.7.0",
|
|
25
|
+
"standard-version": "^9.3.2"
|
|
26
|
+
},
|
|
27
|
+
"standard-version": {
|
|
28
|
+
"skip": {
|
|
29
|
+
"commit": true
|
|
30
|
+
}
|
|
22
31
|
}
|
|
23
32
|
}
|
package/src/animation.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { multiColor,font } from './';
|
|
1
|
+
import { multiColor, font } from './';
|
|
2
2
|
const animation = {
|
|
3
3
|
show: false,
|
|
4
4
|
duration: 3,
|
|
@@ -43,6 +43,37 @@ export default ({
|
|
|
43
43
|
],
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
+
const defaultDataAnimation = {
|
|
47
|
+
show: false,
|
|
48
|
+
duration: 3,
|
|
49
|
+
};
|
|
50
|
+
export const dataAnimation = ({
|
|
51
|
+
show = defaultDataAnimation.show,
|
|
52
|
+
duration = defaultDataAnimation.duration,
|
|
53
|
+
} = defaultDataAnimation) => ({
|
|
54
|
+
name: 'dataAnimation',
|
|
55
|
+
displayName: '数据动画',
|
|
56
|
+
value: [
|
|
57
|
+
{
|
|
58
|
+
name: 'show',
|
|
59
|
+
displayName: '打开',
|
|
60
|
+
value: show,
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
rule: [['show', '$eq', true]],
|
|
65
|
+
name: 'duration',
|
|
66
|
+
displayName: '滚动时长',
|
|
67
|
+
value: duration,
|
|
68
|
+
type: 'number',
|
|
69
|
+
config: {
|
|
70
|
+
span: 12,
|
|
71
|
+
suffix: 's',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
});
|
|
76
|
+
|
|
46
77
|
const defaultAnimationOfPie = {
|
|
47
78
|
show: true,
|
|
48
79
|
current: { heighten: 10, opacity: 60 },
|
|
@@ -62,10 +93,10 @@ export const animationOfPie = ({
|
|
|
62
93
|
displayName: '轮播动画',
|
|
63
94
|
value: [
|
|
64
95
|
{
|
|
65
|
-
name: 'on',
|
|
66
|
-
displayName: '开启',
|
|
67
|
-
value: show,
|
|
68
|
-
type: 'boolean'
|
|
96
|
+
name: 'on',
|
|
97
|
+
displayName: '开启',
|
|
98
|
+
value: show,
|
|
99
|
+
type: 'boolean',
|
|
69
100
|
},
|
|
70
101
|
{
|
|
71
102
|
rule: [['on', '$eq', true]],
|
|
@@ -84,8 +115,8 @@ export const animationOfPie = ({
|
|
|
84
115
|
value: opacity,
|
|
85
116
|
type: 'range',
|
|
86
117
|
config: {
|
|
87
|
-
min:0,
|
|
88
|
-
max:100,
|
|
118
|
+
min: 0,
|
|
119
|
+
max: 100,
|
|
89
120
|
suffix: '%',
|
|
90
121
|
},
|
|
91
122
|
},
|
|
@@ -122,38 +153,38 @@ export const animationOfPie = ({
|
|
|
122
153
|
],
|
|
123
154
|
});
|
|
124
155
|
|
|
125
|
-
const defaultAnimationOfCarousel= {
|
|
156
|
+
const defaultAnimationOfCarousel = {
|
|
126
157
|
show: true,
|
|
127
|
-
current: {
|
|
128
|
-
width: 0.1,
|
|
158
|
+
current: {
|
|
159
|
+
width: 0.1,
|
|
129
160
|
color: multiColor(),
|
|
130
|
-
font:font(),
|
|
131
|
-
gap: 15
|
|
161
|
+
font: font(),
|
|
162
|
+
gap: 15,
|
|
132
163
|
},
|
|
133
164
|
interval: 3,
|
|
134
165
|
rotate: 30,
|
|
135
166
|
interactive: true,
|
|
136
167
|
};
|
|
137
|
-
export const animationOfCarousel= ({
|
|
168
|
+
export const animationOfCarousel = ({
|
|
138
169
|
show = defaultAnimationOfCarousel.show,
|
|
139
170
|
current: {
|
|
140
171
|
width = defaultAnimationOfCarousel.current.width,
|
|
141
172
|
color = defaultAnimationOfCarousel.current.color,
|
|
142
173
|
textStyle = defaultAnimationOfCarousel.current.font,
|
|
143
|
-
gap = defaultAnimationOfCarousel.current.gap
|
|
174
|
+
gap = defaultAnimationOfCarousel.current.gap,
|
|
144
175
|
} = defaultAnimationOfCarousel.current,
|
|
145
176
|
interval = defaultAnimationOfCarousel.interval,
|
|
146
177
|
rotate = defaultAnimationOfCarousel.rotate,
|
|
147
|
-
interactive = defaultAnimationOfCarousel.interactive
|
|
178
|
+
interactive = defaultAnimationOfCarousel.interactive,
|
|
148
179
|
} = defaultAnimationOfCarousel) => ({
|
|
149
180
|
name: 'animation',
|
|
150
181
|
displayName: '轮播动画',
|
|
151
182
|
value: [
|
|
152
183
|
{
|
|
153
|
-
name: 'on',
|
|
154
|
-
displayName: '开启',
|
|
155
|
-
value: show,
|
|
156
|
-
type: 'boolean'
|
|
184
|
+
name: 'on',
|
|
185
|
+
displayName: '开启',
|
|
186
|
+
value: show,
|
|
187
|
+
type: 'boolean',
|
|
157
188
|
},
|
|
158
189
|
{
|
|
159
190
|
rule: [['on', '$eq', true]],
|
|
@@ -175,18 +206,19 @@ export const animationOfCarousel= ({
|
|
|
175
206
|
{
|
|
176
207
|
name: 'textStyle',
|
|
177
208
|
displayName: '类目文本样式',
|
|
178
|
-
value:font(textStyle),
|
|
179
|
-
type:
|
|
209
|
+
value: font(textStyle),
|
|
210
|
+
type: 'textStyle',
|
|
211
|
+
markColorType: 'textColor',
|
|
180
212
|
},
|
|
181
213
|
{
|
|
182
214
|
name: 'gap',
|
|
183
215
|
displayName: '类目文本间距',
|
|
184
216
|
value: gap,
|
|
185
217
|
type: 'number',
|
|
186
|
-
config:{
|
|
187
|
-
suffix:
|
|
188
|
-
}
|
|
189
|
-
}
|
|
218
|
+
config: {
|
|
219
|
+
suffix: 'px',
|
|
220
|
+
},
|
|
221
|
+
},
|
|
190
222
|
],
|
|
191
223
|
config: {
|
|
192
224
|
defaultOpen: true,
|
|
@@ -209,8 +241,8 @@ export const animationOfCarousel= ({
|
|
|
209
241
|
value: rotate,
|
|
210
242
|
type: 'number',
|
|
211
243
|
config: {
|
|
212
|
-
min:0,
|
|
213
|
-
max:360,
|
|
244
|
+
min: 0,
|
|
245
|
+
max: 360,
|
|
214
246
|
suffix: '°',
|
|
215
247
|
},
|
|
216
248
|
},
|
|
@@ -218,7 +250,7 @@ export const animationOfCarousel= ({
|
|
|
218
250
|
name: 'interactive',
|
|
219
251
|
displayName: '点击交互',
|
|
220
252
|
value: interactive,
|
|
221
|
-
type:
|
|
222
|
-
}
|
|
253
|
+
type: 'boolean',
|
|
254
|
+
},
|
|
223
255
|
],
|
|
224
256
|
});
|
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: {
|