@easyv/config 1.3.6 → 1.3.7

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/series.js DELETED
@@ -1,982 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.purePieSeries = exports.pieSeries = exports.lineSeries = exports.bandSeries = exports.areaSeries = void 0;
8
- var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _ = require(".");
10
- var _mapping = {
11
- fieldName: '',
12
- displayName: ''
13
- };
14
- var defaultBandSeries = {
15
- mapping: _mapping,
16
- yOrZ: 'y',
17
- fillImage: 'components/static-image/superChart/pattern.png',
18
- fill: {
19
- type: 'linear',
20
- pure: '#fff',
21
- linear: {
22
- stops: [{
23
- offset: 0,
24
- color: '#fff'
25
- }, {
26
- offset: 50,
27
- color: '#ff0'
28
- }, {
29
- offset: 100,
30
- color: '#f0f'
31
- }],
32
- angle: 30,
33
- opacity: 1
34
- }
35
- },
36
- borderColor: (0, _.multiColor)({
37
- type: "pure",
38
- linear: {
39
- stops: [{
40
- color: "rgba(218,237,255,1)",
41
- offset: 0
42
- }, {
43
- color: "rgba(24,144,255,0.24)",
44
- offset: 100
45
- }]
46
- }
47
- }),
48
- borderWidth: 0,
49
- highlight: {
50
- show: false,
51
- extent: 'max',
52
- fill: {
53
- type: 'linear',
54
- pure: '#fff',
55
- linear: {
56
- stops: [{
57
- offset: 0,
58
- color: '#fff'
59
- }, {
60
- offset: 50,
61
- color: '#ff0'
62
- }, {
63
- offset: 100,
64
- color: '#f0f'
65
- }],
66
- angle: 30,
67
- opacity: 1
68
- }
69
- }
70
- },
71
- size: {
72
- width: 10,
73
- height: 10
74
- },
75
- opacity: 0.65
76
- };
77
- var bandSeries = function bandSeries() {
78
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Math.random() + '';
79
- var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultBandSeries,
80
- _ref$mapping = _ref.mapping;
81
- _ref$mapping = _ref$mapping === void 0 ? defaultBandSeries.mapping : _ref$mapping;
82
- var _ref$mapping$fieldNam = _ref$mapping.fieldName,
83
- fieldName = _ref$mapping$fieldNam === void 0 ? defaultBandSeries.mapping.fieldName : _ref$mapping$fieldNam,
84
- _ref$mapping$displayN = _ref$mapping.displayName,
85
- displayName = _ref$mapping$displayN === void 0 ? defaultBandSeries.mapping.displayName : _ref$mapping$displayN,
86
- _ref$yOrZ = _ref.yOrZ,
87
- yOrZ = _ref$yOrZ === void 0 ? defaultBandSeries.yOrZ : _ref$yOrZ,
88
- stack = _ref.stack,
89
- patternType = _ref.patternType,
90
- fillType = _ref.fillType,
91
- _ref$fillImage = _ref.fillImage,
92
- fillImage = _ref$fillImage === void 0 ? defaultBandSeries.fillImage : _ref$fillImage,
93
- patternWidth = _ref.patternWidth,
94
- patternHeight = _ref.patternHeight,
95
- patternImage = _ref.patternImage,
96
- _ref$fill = _ref.fill,
97
- fill = _ref$fill === void 0 ? defaultBandSeries.fill : _ref$fill,
98
- _ref$borderWidth = _ref.borderWidth,
99
- borderWidth = _ref$borderWidth === void 0 ? defaultBandSeries.borderWidth : _ref$borderWidth,
100
- _ref$borderColor = _ref.borderColor,
101
- borderColor = _ref$borderColor === void 0 ? defaultBandSeries.borderColor : _ref$borderColor,
102
- _ref$size = _ref.size;
103
- _ref$size = _ref$size === void 0 ? defaultBandSeries.size : _ref$size;
104
- var _ref$size$width = _ref$size.width,
105
- urlWidth = _ref$size$width === void 0 ? defaultBandSeries.size.width : _ref$size$width,
106
- _ref$size$height = _ref$size.height,
107
- urlHeight = _ref$size$height === void 0 ? defaultBandSeries.size.height : _ref$size$height,
108
- _ref$opacity = _ref.opacity,
109
- opacity = _ref$opacity === void 0 ? defaultBandSeries.opacity : _ref$opacity,
110
- headDecorate = _ref.headDecorate,
111
- _ref$highlight = _ref.highlight;
112
- _ref$highlight = _ref$highlight === void 0 ? defaultBandSeries.highlight : _ref$highlight;
113
- var _ref$highlight$show = _ref$highlight.show,
114
- showHighlight = _ref$highlight$show === void 0 ? defaultBandSeries.highlight.show : _ref$highlight$show,
115
- _ref$highlight$extent = _ref$highlight.extent,
116
- highlightExtent = _ref$highlight$extent === void 0 ? defaultBandSeries.highlight.extent : _ref$highlight$extent,
117
- _ref$highlight$fill = _ref$highlight.fill,
118
- highlightFill = _ref$highlight$fill === void 0 ? defaultBandSeries.highlight.fill : _ref$highlight$fill,
119
- bandLabel = _ref.label;
120
- return {
121
- name: name,
122
- displayName: '系列',
123
- value: [(0, _.mapping)({
124
- fieldName: fieldName,
125
- displayName: displayName
126
- }), {
127
- name: 'yOrZ',
128
- displayName: '纵轴选择',
129
- value: yOrZ,
130
- type: 'select',
131
- config: {
132
- options: [{
133
- name: 'Y轴',
134
- value: 'y'
135
- }, {
136
- name: 'Z轴',
137
- value: 'z'
138
- }]
139
- }
140
- }, stack !== undefined && {
141
- name: 'stack',
142
- displayName: '堆叠',
143
- value: stack,
144
- type: 'input'
145
- }, fillType !== undefined && {
146
- name: 'fillType',
147
- displayName: '填充样式',
148
- value: fillType,
149
- type: 'radio',
150
- config: {
151
- options: [{
152
- name: '颜色',
153
- value: 'color'
154
- }, {
155
- name: '纹理',
156
- value: 'pattern'
157
- }]
158
- }
159
- }, fillType !== undefined && {
160
- rule: [['fillType', '$eq', 'color']],
161
- name: 'fill',
162
- displayName: '颜色',
163
- type: 'multicolor',
164
- value: fill,
165
- markColorType: 'seriesGradient'
166
- }, fillType !== undefined && {
167
- rule: [['fillType', '$eq', 'pattern']],
168
- name: 'url',
169
- displayName: '纹理图片',
170
- type: 'uploadImage',
171
- value: fillImage
172
- }, fillType !== undefined && {
173
- rule: [['fillType', '$eq', 'pattern']],
174
- name: 'size',
175
- displayName: '尺寸',
176
- value: [{
177
- name: 'width',
178
- displayName: '宽度',
179
- value: urlWidth,
180
- config: {
181
- span: 12,
182
- suffix: 'W'
183
- }
184
- }, {
185
- name: 'height',
186
- displayName: '高度',
187
- value: urlHeight,
188
- config: {
189
- span: 12,
190
- suffix: 'H'
191
- }
192
- }],
193
- type: 'group'
194
- }, fillType !== undefined && {
195
- rule: [['fillType', '$eq', 'pattern']],
196
- type: 'range',
197
- name: 'opacity',
198
- displayName: '透明度',
199
- value: opacity,
200
- config: {
201
- max: 1,
202
- min: 0,
203
- step: 0.01
204
- }
205
- }, (patternType !== undefined || fillType === undefined) && {
206
- name: 'fill',
207
- displayName: '颜色',
208
- type: 'multicolor',
209
- value: fill,
210
- markColorType: 'seriesGradient'
211
- }, patternType !== undefined && {
212
- name: 'patternType',
213
- displayName: '纹理类型',
214
- value: patternType,
215
- type: 'radio',
216
- config: {
217
- options: [{
218
- name: '默认',
219
- value: 'default'
220
- }, {
221
- name: '自定义',
222
- value: 'custom'
223
- }]
224
- }
225
- }, patternImage !== undefined && {
226
- rule: [['patternType', '$eq', 'custom']],
227
- name: 'patternImage',
228
- displayName: '纹理',
229
- value: patternImage,
230
- type: 'uploadImage'
231
- }, patternWidth !== undefined && {
232
- name: 'patternWidth',
233
- displayName: '纹理宽度',
234
- value: patternWidth,
235
- type: 'number',
236
- config: {
237
- suffix: 'px'
238
- }
239
- }, patternHeight !== undefined && {
240
- name: 'patternHeight',
241
- displayName: '纹理高度',
242
- value: patternHeight,
243
- type: 'number',
244
- config: {
245
- suffix: 'px'
246
- }
247
- }, fillType !== undefined && {
248
- name: 'border',
249
- displayName: '描边',
250
- value: [{
251
- name: "borderWidth",
252
- displayName: "线宽",
253
- type: "number",
254
- value: borderWidth,
255
- config: {
256
- min: 0
257
- }
258
- }, {
259
- name: "borderColor",
260
- displayName: "描边颜色",
261
- type: "multicolor",
262
- value: borderColor
263
- }]
264
- }, (patternType !== undefined || fillType === undefined) && {
265
- name: 'border',
266
- displayName: '描边',
267
- value: [{
268
- name: "borderWidth",
269
- displayName: "线宽",
270
- type: "number",
271
- value: borderWidth,
272
- config: {
273
- min: 0
274
- }
275
- }, {
276
- name: "borderColor",
277
- displayName: "描边颜色",
278
- type: "multicolor",
279
- value: borderColor
280
- }]
281
- }, {
282
- name: 'highlight',
283
- displayName: '极值高亮',
284
- value: [{
285
- name: 'show',
286
- displayName: '显示',
287
- type: 'boolean',
288
- value: showHighlight
289
- }, {
290
- rule: [['show', '$eq', true]],
291
- name: 'extent',
292
- displayName: '极值',
293
- value: highlightExtent,
294
- type: 'select',
295
- config: {
296
- options: [{
297
- name: '最大值',
298
- value: 'max'
299
- }, {
300
- name: '最小值',
301
- value: 'min'
302
- }]
303
- }
304
- }, {
305
- rule: [['show', '$eq', true]],
306
- name: 'fill',
307
- displayName: '颜色',
308
- type: 'multicolor',
309
- value: highlightFill
310
- }]
311
- }, headDecorate !== undefined && (0, _.sc)("headDecorate", "头部装饰", '', [(0, _.show)(headDecorate.show || false), (0, _.sc)("type", "类型", "radio", headDecorate.type || "image", {
312
- options: [{
313
- name: "图片",
314
- value: "image"
315
- }, {
316
- name: "视频",
317
- value: "video"
318
- }]
319
- }), (0, _.sc)("url", "图片", "image", headDecorate.image, {}, (0, _.showRule)("type", "$eq", "image")), (0, _.sc)("video", "视频", "video", headDecorate.video, {}, (0, _.showRule)("type", "$eq", "video")), (0, _.sc)("size", "尺寸", "group", [(0, _.sc)("width", "宽", "number", headDecorate.size && headDecorate.size.width || 20, {
320
- span: 12,
321
- suffix: "px"
322
- }), (0, _.sc)("height", "高", "number", headDecorate.size && headDecorate.size.height || 20, {
323
- span: 12,
324
- suffix: "px"
325
- })]), (0, _.translate)(headDecorate.translate && headDecorate.translate.x, headDecorate.translate && headDecorate.translate.y)], {
326
- defaultOpen: true
327
- }), (0, _.label)(bandLabel)].filter(function (item) {
328
- return !!item;
329
- }),
330
- type: 'object'
331
- };
332
- };
333
- exports.bandSeries = bandSeries;
334
- var defaultLineSeries = {
335
- mapping: _mapping,
336
- yOrZ: 'y',
337
- line: {
338
- type: 'solid',
339
- color: '#FFFFFF',
340
- lineWidth: '1',
341
- curve: true,
342
- tension: 0,
343
- connectNulls: false,
344
- lineShadow: {
345
- show: false,
346
- shadow: {
347
- color: "#fff",
348
- vShadow: 8,
349
- hShadow: 8,
350
- blur: 8
351
- }
352
- },
353
- lighter: {
354
- show: false,
355
- fill: {
356
- type: 'linear',
357
- pure: '#fff',
358
- linear: {
359
- stops: [{
360
- offset: 0,
361
- color: 'rgba(255,255,255,0)'
362
- }, {
363
- offset: 20,
364
- color: 'rgba(255,255,255,0.3)'
365
- }, {
366
- offset: 100,
367
- color: 'rgba(255,255,255,1)'
368
- }],
369
- angle: 30,
370
- opacity: 1
371
- }
372
- },
373
- length: 150,
374
- width: 2,
375
- unitStep: 1
376
- }
377
- },
378
- areaType: 'color',
379
- size: {
380
- width: 10,
381
- height: 10
382
- },
383
- url: 'components/static-image/superChart/pattern.png',
384
- opacity: 0.65,
385
- areaColor: {
386
- type: 'linear',
387
- pure: '#fff',
388
- linear: {
389
- stops: [{
390
- offset: 0,
391
- color: '#fff'
392
- }, {
393
- offset: 50,
394
- color: '#ff0'
395
- }, {
396
- offset: 100,
397
- color: '#f0f'
398
- }],
399
- angle: 30,
400
- opacity: 1
401
- }
402
- }
403
- };
404
- var defaultIcon = {
405
- show: true,
406
- mode: 'single',
407
- inner: {
408
- color: '#83C4FF',
409
- radius: 3
410
- },
411
- outer: {
412
- color: 'rgba(24,144,255,0.4)',
413
- radius: 6
414
- },
415
- color: '#1283E3',
416
- radius: 4,
417
- image: 'components/static-image/superChart/fang.png',
418
- size: {
419
- width: 10,
420
- height: 10
421
- }
422
- };
423
- var commonLine = function commonLine() {
424
- var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultLineSeries.line,
425
- _ref2$type = _ref2.type,
426
- type = _ref2$type === void 0 ? defaultLineSeries.line.type : _ref2$type,
427
- _ref2$color = _ref2.color,
428
- color = _ref2$color === void 0 ? defaultLineSeries.line.color : _ref2$color,
429
- _ref2$lineWidth = _ref2.lineWidth,
430
- lineWidth = _ref2$lineWidth === void 0 ? defaultLineSeries.line.lineWidth : _ref2$lineWidth,
431
- _ref2$curve = _ref2.curve,
432
- curve = _ref2$curve === void 0 ? defaultLineSeries.line.curve : _ref2$curve,
433
- _ref2$tension = _ref2.tension,
434
- tension = _ref2$tension === void 0 ? defaultLineSeries.line.tension : _ref2$tension,
435
- _ref2$connectNulls = _ref2.connectNulls,
436
- connectNulls = _ref2$connectNulls === void 0 ? defaultLineSeries.line.connectNulls : _ref2$connectNulls;
437
- return [{
438
- name: 'type',
439
- displayName: '类型',
440
- value: type,
441
- type: 'select',
442
- config: {
443
- options: [{
444
- name: '实线',
445
- value: 'solid'
446
- }, {
447
- name: '虚线',
448
- value: 'dash'
449
- }]
450
- }
451
- }, {
452
- name: 'color',
453
- displayName: '颜色',
454
- value: color,
455
- type: 'color',
456
- markColorType: 'palette'
457
- }, {
458
- name: 'lineWidth',
459
- displayName: '粗细',
460
- value: lineWidth,
461
- type: 'input',
462
- config: {
463
- suffix: 'px'
464
- }
465
- }, {
466
- name: 'curve',
467
- displayName: '曲线',
468
- value: curve,
469
- type: 'boolean'
470
- }, {
471
- rule: [['curve', '$eq', true]],
472
- name: 'tension',
473
- displayName: '曲线张力',
474
- value: tension,
475
- type: 'range',
476
- config: {
477
- min: 0,
478
- max: 1,
479
- step: 0.1
480
- }
481
- }, {
482
- name: 'connectNulls',
483
- displayName: 'null值连接',
484
- value: connectNulls,
485
- type: 'boolean'
486
- }];
487
- };
488
- var lighter = function lighter() {
489
- var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultLineSeries.line.lighter,
490
- _ref3$show = _ref3.show,
491
- show = _ref3$show === void 0 ? defaultLineSeries.line.lighter.show : _ref3$show,
492
- _ref3$fill = _ref3.fill,
493
- fill = _ref3$fill === void 0 ? defaultLineSeries.line.lighter.fill : _ref3$fill,
494
- _ref3$length = _ref3.length,
495
- length = _ref3$length === void 0 ? defaultLineSeries.line.lighter.length : _ref3$length,
496
- _ref3$width = _ref3.width,
497
- width = _ref3$width === void 0 ? defaultLineSeries.line.lighter.width : _ref3$width,
498
- _ref3$unitStep = _ref3.unitStep,
499
- unitStep = _ref3$unitStep === void 0 ? defaultLineSeries.line.lighter.unitStep : _ref3$unitStep;
500
- return {
501
- name: 'lighter',
502
- displayName: '光效',
503
- value: [{
504
- name: 'show',
505
- displayName: '显示',
506
- value: show,
507
- type: 'boolean'
508
- }, {
509
- rule: [['show', '$eq', true]],
510
- name: 'fill',
511
- displayName: '颜色',
512
- type: 'multicolor',
513
- value: fill,
514
- markColorType: 'seriesGradient'
515
- }, {
516
- rule: [['show', '$eq', true]],
517
- name: 'length',
518
- displayName: '长度',
519
- value: length,
520
- type: 'number'
521
- }, {
522
- rule: [['show', '$eq', true]],
523
- name: 'width',
524
- displayName: '宽度',
525
- value: width,
526
- type: 'number'
527
- }, {
528
- rule: [['show', '$eq', true]],
529
- name: 'unitStep',
530
- displayName: '速度',
531
- value: unitStep,
532
- type: 'number'
533
- }]
534
- };
535
- };
536
- var icon = function icon() {
537
- var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultIcon,
538
- _ref4$show = _ref4.show,
539
- show = _ref4$show === void 0 ? defaultIcon.show : _ref4$show,
540
- _ref4$mode = _ref4.mode,
541
- mode = _ref4$mode === void 0 ? defaultIcon.mode : _ref4$mode,
542
- _ref4$inner = _ref4.inner;
543
- _ref4$inner = _ref4$inner === void 0 ? defaultIcon.inner : _ref4$inner;
544
- var _ref4$inner$color = _ref4$inner.color,
545
- innerColor = _ref4$inner$color === void 0 ? defaultIcon.inner.color : _ref4$inner$color,
546
- _ref4$inner$radius = _ref4$inner.radius,
547
- innerRadius = _ref4$inner$radius === void 0 ? defaultIcon.inner.innerRadius : _ref4$inner$radius,
548
- _ref4$outer = _ref4.outer;
549
- _ref4$outer = _ref4$outer === void 0 ? defaultIcon.outer : _ref4$outer;
550
- var _ref4$outer$color = _ref4$outer.color,
551
- outerColor = _ref4$outer$color === void 0 ? defaultIcon.outer.color : _ref4$outer$color,
552
- _ref4$outer$radius = _ref4$outer.radius,
553
- outerRadius = _ref4$outer$radius === void 0 ? defaultIcon.outer.radius : _ref4$outer$radius,
554
- _ref4$color = _ref4.color,
555
- color = _ref4$color === void 0 ? defaultIcon.color : _ref4$color,
556
- _ref4$radius = _ref4.radius,
557
- radius = _ref4$radius === void 0 ? defaultIcon.radius : _ref4$radius,
558
- _ref4$image = _ref4.image,
559
- image = _ref4$image === void 0 ? defaultIcon.image : _ref4$image,
560
- _ref4$size = _ref4.size;
561
- _ref4$size = _ref4$size === void 0 ? defaultIcon.size : _ref4$size;
562
- var _ref4$size$width = _ref4$size.width,
563
- imageWidth = _ref4$size$width === void 0 ? defaultIcon.size.width : _ref4$size$width,
564
- _ref4$size$height = _ref4$size.height,
565
- imageHeight = _ref4$size$height === void 0 ? defaultIcon.size.height : _ref4$size$height;
566
- return {
567
- name: 'icon',
568
- displayName: '数据标记',
569
- value: [{
570
- name: 'show',
571
- displayName: '显示',
572
- value: show,
573
- type: 'boolean'
574
- }, {
575
- rule: [['show', '$eq', true]],
576
- name: 'mode',
577
- displayName: '模式',
578
- value: mode,
579
- type: 'select',
580
- config: {
581
- options: [{
582
- name: '单圆',
583
- value: 'single'
584
- }, {
585
- name: '双圆',
586
- value: 'double'
587
- }, {
588
- name: '自定义',
589
- value: 'custom'
590
- }]
591
- }
592
- }, {
593
- rule: [['show', '$eq', true], ['mode', '$eq', 'custom']],
594
- name: 'image',
595
- displayName: '图片',
596
- value: image,
597
- type: 'uploadImage'
598
- }, {
599
- rule: [['show', '$eq', true], ['mode', '$eq', 'custom']],
600
- name: 'size',
601
- displayName: '尺寸',
602
- value: [{
603
- name: 'width',
604
- displayName: '宽度',
605
- value: imageWidth,
606
- config: {
607
- span: 12,
608
- suffix: 'W'
609
- }
610
- }, {
611
- name: 'height',
612
- displayName: '高度',
613
- value: imageHeight,
614
- config: {
615
- span: 12,
616
- suffix: 'H'
617
- }
618
- }],
619
- type: 'group'
620
- }, {
621
- rule: [['show', '$eq', true], ['mode', '$eq', 'double']],
622
- name: 'inner',
623
- displayName: '内圆',
624
- value: [{
625
- name: 'color',
626
- displayName: '颜色',
627
- value: innerColor,
628
- type: 'color'
629
- }, {
630
- name: 'radius',
631
- displayName: '半径',
632
- value: innerRadius,
633
- type: 'number',
634
- config: {
635
- min: 0,
636
- suffix: 'px'
637
- }
638
- }]
639
- }, {
640
- rule: [['show', '$eq', true], ['mode', '$eq', 'double']],
641
- name: 'outer',
642
- displayName: '外圆',
643
- value: [{
644
- name: 'color',
645
- displayName: '颜色',
646
- value: outerColor,
647
- type: 'color'
648
- }, {
649
- name: 'radius',
650
- displayName: '半径',
651
- value: outerRadius,
652
- type: 'number',
653
- config: {
654
- min: 0,
655
- suffix: 'px'
656
- }
657
- }]
658
- }, {
659
- rule: [['show', '$eq', true], ['mode', '$eq', 'single']],
660
- name: 'color',
661
- displayName: '颜色',
662
- value: color,
663
- type: 'color',
664
- markColorType: 'palette'
665
- }, {
666
- rule: [['show', '$eq', true], ['mode', '$eq', 'single']],
667
- name: 'radius',
668
- displayName: '半径',
669
- value: radius,
670
- type: 'number',
671
- config: {
672
- min: 0,
673
- suffix: 'px'
674
- }
675
- }]
676
- };
677
- };
678
- var lineSeries = function lineSeries() {
679
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Math.random() + '';
680
- var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultLineSeries,
681
- _ref5$mapping = _ref5.mapping;
682
- _ref5$mapping = _ref5$mapping === void 0 ? defaultLineSeries.mapping : _ref5$mapping;
683
- var _ref5$mapping$fieldNa = _ref5$mapping.fieldName,
684
- fieldName = _ref5$mapping$fieldNa === void 0 ? defaultLineSeries.mapping.fieldName : _ref5$mapping$fieldNa,
685
- _ref5$mapping$display = _ref5$mapping.displayName,
686
- displayName = _ref5$mapping$display === void 0 ? defaultLineSeries.mapping.displayName : _ref5$mapping$display,
687
- _ref5$yOrZ = _ref5.yOrZ,
688
- yOrZ = _ref5$yOrZ === void 0 ? defaultLineSeries.yOrZ : _ref5$yOrZ,
689
- _ref5$line = _ref5.line;
690
- _ref5$line = _ref5$line === void 0 ? defaultLineSeries.line : _ref5$line;
691
- var _ref5$line$type = _ref5$line.type,
692
- type = _ref5$line$type === void 0 ? defaultLineSeries.line.type : _ref5$line$type,
693
- _ref5$line$color = _ref5$line.color,
694
- color = _ref5$line$color === void 0 ? defaultLineSeries.line.color : _ref5$line$color,
695
- _ref5$line$lineWidth = _ref5$line.lineWidth,
696
- lineWidth = _ref5$line$lineWidth === void 0 ? defaultLineSeries.line.lineWidth : _ref5$line$lineWidth,
697
- _ref5$line$curve = _ref5$line.curve,
698
- curve = _ref5$line$curve === void 0 ? defaultLineSeries.line.curve : _ref5$line$curve,
699
- _ref5$line$tension = _ref5$line.tension,
700
- tension = _ref5$line$tension === void 0 ? defaultLineSeries.line.tension : _ref5$line$tension,
701
- _ref5$line$connectNul = _ref5$line.connectNulls,
702
- connectNulls = _ref5$line$connectNul === void 0 ? defaultLineSeries.line.connectNulls : _ref5$line$connectNul,
703
- _ref5$line$lineShadow = _ref5$line.lineShadow;
704
- _ref5$line$lineShadow = _ref5$line$lineShadow === void 0 ? defaultLineSeries.line.lineShadow : _ref5$line$lineShadow;
705
- var _ref5$line$lineShadow2 = _ref5$line$lineShadow.show,
706
- showShadow = _ref5$line$lineShadow2 === void 0 ? defaultLineSeries.line.lineShadow.show : _ref5$line$lineShadow2,
707
- _ref5$line$lineShadow3 = _ref5$line$lineShadow.shadow,
708
- shadow_ = _ref5$line$lineShadow3 === void 0 ? defaultLineSeries.line.lineShadow.shadow : _ref5$line$lineShadow3,
709
- lineIcon = _ref5.icon,
710
- lineLabel = _ref5.label;
711
- return {
712
- name: name,
713
- displayName: '系列',
714
- value: [(0, _.mapping)({
715
- fieldName: fieldName,
716
- displayName: displayName
717
- }), {
718
- name: 'yOrZ',
719
- displayName: '纵轴选择',
720
- value: yOrZ,
721
- type: 'select',
722
- config: {
723
- options: [{
724
- name: 'Y轴',
725
- value: 'y'
726
- }, {
727
- name: 'Z轴',
728
- value: 'z'
729
- }]
730
- }
731
- }, {
732
- name: 'line',
733
- displayName: '折线',
734
- value: [].concat((0, _toConsumableArray2["default"])(commonLine({
735
- type: type,
736
- color: color,
737
- lineWidth: lineWidth,
738
- curve: curve,
739
- tension: tension,
740
- connectNulls: connectNulls
741
- })), [(0, _.sc)("lineShadow", "折线阴影", "", [(0, _.show)(showShadow), (0, _.sc)("shadow", "阴影", "shadow", (0, _.shadow)(shadow_), {}, (0, _.showRule)())])])
742
- }, icon(lineIcon), (0, _.label)(lineLabel)],
743
- type: 'object'
744
- };
745
- };
746
- exports.lineSeries = lineSeries;
747
- var areaSeries = function areaSeries() {
748
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Math.random() + '';
749
- var _ref6 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultLineSeries,
750
- _ref6$mapping = _ref6.mapping;
751
- _ref6$mapping = _ref6$mapping === void 0 ? defaultLineSeries.mapping : _ref6$mapping;
752
- var _ref6$mapping$fieldNa = _ref6$mapping.fieldName,
753
- fieldName = _ref6$mapping$fieldNa === void 0 ? defaultLineSeries.mapping.fieldName : _ref6$mapping$fieldNa,
754
- _ref6$mapping$display = _ref6$mapping.displayName,
755
- displayName = _ref6$mapping$display === void 0 ? defaultLineSeries.mapping.displayName : _ref6$mapping$display,
756
- _ref6$yOrZ = _ref6.yOrZ,
757
- yOrZ = _ref6$yOrZ === void 0 ? defaultLineSeries.yOrZ : _ref6$yOrZ,
758
- _ref6$line = _ref6.line;
759
- _ref6$line = _ref6$line === void 0 ? defaultLineSeries.line : _ref6$line;
760
- var _ref6$line$type = _ref6$line.type,
761
- type = _ref6$line$type === void 0 ? defaultLineSeries.line.type : _ref6$line$type,
762
- _ref6$line$color = _ref6$line.color,
763
- color = _ref6$line$color === void 0 ? defaultLineSeries.line.color : _ref6$line$color,
764
- _ref6$line$lineWidth = _ref6$line.lineWidth,
765
- lineWidth = _ref6$line$lineWidth === void 0 ? defaultLineSeries.line.lineWidth : _ref6$line$lineWidth,
766
- _ref6$line$curve = _ref6$line.curve,
767
- curve = _ref6$line$curve === void 0 ? defaultLineSeries.line.curve : _ref6$line$curve,
768
- _ref6$line$tension = _ref6$line.tension,
769
- tension = _ref6$line$tension === void 0 ? defaultLineSeries.line.tension : _ref6$line$tension,
770
- _ref6$line$connectNul = _ref6$line.connectNulls,
771
- connectNulls = _ref6$line$connectNul === void 0 ? defaultLineSeries.line.connectNulls : _ref6$line$connectNul,
772
- _ref6$line$lineShadow = _ref6$line.lineShadow;
773
- _ref6$line$lineShadow = _ref6$line$lineShadow === void 0 ? defaultLineSeries.line.lineShadow : _ref6$line$lineShadow;
774
- var _ref6$line$lineShadow2 = _ref6$line$lineShadow.show,
775
- showShadow = _ref6$line$lineShadow2 === void 0 ? defaultLineSeries.line.lineShadow.show : _ref6$line$lineShadow2,
776
- _ref6$line$lineShadow3 = _ref6$line$lineShadow.shadow,
777
- shadow_ = _ref6$line$lineShadow3 === void 0 ? defaultLineSeries.line.lineShadow.shadow : _ref6$line$lineShadow3,
778
- lineLighter = _ref6$line.lighter,
779
- lineIcon = _ref6.icon,
780
- _ref6$label = _ref6.label,
781
- areaLabel = _ref6$label === void 0 ? defaultLineSeries.label : _ref6$label,
782
- _ref6$areaType = _ref6.areaType,
783
- areaType = _ref6$areaType === void 0 ? defaultLineSeries.areaType : _ref6$areaType,
784
- _ref6$areaColor = _ref6.areaColor,
785
- areaColor = _ref6$areaColor === void 0 ? defaultLineSeries.areaColor : _ref6$areaColor,
786
- _ref6$url = _ref6.url,
787
- url = _ref6$url === void 0 ? defaultLineSeries.url : _ref6$url,
788
- _ref6$size = _ref6.size;
789
- _ref6$size = _ref6$size === void 0 ? defaultLineSeries.size : _ref6$size;
790
- var _ref6$size$width = _ref6$size.width,
791
- urlWidth = _ref6$size$width === void 0 ? defaultLineSeries.size.width : _ref6$size$width,
792
- _ref6$size$height = _ref6$size.height,
793
- urlHeight = _ref6$size$height === void 0 ? defaultLineSeries.size.height : _ref6$size$height,
794
- _ref6$opacity = _ref6.opacity,
795
- opacity = _ref6$opacity === void 0 ? defaultLineSeries.opacity : _ref6$opacity;
796
- return {
797
- name: name,
798
- displayName: '系列',
799
- value: [(0, _.mapping)({
800
- fieldName: fieldName,
801
- displayName: displayName
802
- }), {
803
- name: 'yOrZ',
804
- displayName: '纵轴选择',
805
- value: yOrZ,
806
- type: 'select',
807
- config: {
808
- options: [{
809
- name: 'Y轴',
810
- value: 'y'
811
- }, {
812
- name: 'Z轴',
813
- value: 'z'
814
- }]
815
- }
816
- }, {
817
- name: 'areaType',
818
- displayName: '区域样式',
819
- value: areaType,
820
- type: 'radio',
821
- config: {
822
- options: [{
823
- name: '颜色',
824
- value: 'color'
825
- }, {
826
- name: '纹理',
827
- value: 'pattern'
828
- }]
829
- }
830
- }, {
831
- rule: [['areaType', '$eq', 'color']],
832
- name: 'areaColor',
833
- displayName: '区域颜色',
834
- type: 'multicolor',
835
- value: areaColor,
836
- markColorType: 'seriesGradient'
837
- }, {
838
- rule: [['areaType', '$eq', 'pattern']],
839
- name: 'url',
840
- displayName: '纹理图片',
841
- value: url,
842
- type: 'uploadImage'
843
- }, {
844
- rule: [['areaType', '$eq', 'pattern']],
845
- name: 'size',
846
- displayName: '尺寸',
847
- value: [{
848
- name: 'width',
849
- displayName: '宽度',
850
- value: urlWidth,
851
- config: {
852
- span: 12,
853
- suffix: 'W'
854
- }
855
- }, {
856
- name: 'height',
857
- displayName: '高度',
858
- value: urlHeight,
859
- config: {
860
- span: 12,
861
- suffix: 'H'
862
- }
863
- }],
864
- type: 'group'
865
- }, {
866
- rule: [['areaType', '$eq', 'pattern']],
867
- type: 'range',
868
- name: 'opacity',
869
- displayName: '透明度',
870
- value: opacity,
871
- config: {
872
- max: 1,
873
- min: 0,
874
- step: 0.01
875
- }
876
- }, {
877
- name: 'line',
878
- displayName: '折线',
879
- value: [].concat((0, _toConsumableArray2["default"])(commonLine({
880
- type: type,
881
- color: color,
882
- lineWidth: lineWidth,
883
- curve: curve,
884
- tension: tension,
885
- connectNulls: connectNulls
886
- })), [(0, _.sc)("lineShadow", "折线阴影", "", [(0, _.show)(showShadow), (0, _.sc)("shadow", "阴影", "shadow", (0, _.shadow)(shadow_), {}, (0, _.showRule)())]), lineLighter && lighter(lineLighter)]).filter(function (item) {
887
- return !!item;
888
- })
889
- }, icon(lineIcon), (0, _.label)(areaLabel)],
890
- type: 'object'
891
- };
892
- };
893
- exports.areaSeries = areaSeries;
894
- var defaultPieSeries = {
895
- mapping: _mapping,
896
- color: {
897
- type: 'linear',
898
- pure: '#fff',
899
- linear: {
900
- stops: [{
901
- offset: 0,
902
- color: '#fff'
903
- }, {
904
- offset: 50,
905
- color: '#ff0'
906
- }, {
907
- offset: 100,
908
- color: '#f0f'
909
- }],
910
- angle: 30,
911
- opacity: 1
912
- }
913
- }
914
- };
915
- var pieSeries = function pieSeries() {
916
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Math.random() + '';
917
- var _ref7 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultPieSeries,
918
- _ref7$mapping = _ref7.mapping;
919
- _ref7$mapping = _ref7$mapping === void 0 ? defaultPieSeries.mapping : _ref7$mapping;
920
- var _ref7$mapping$fieldNa = _ref7$mapping.fieldName,
921
- fieldName = _ref7$mapping$fieldNa === void 0 ? defaultPieSeries.mapping.fieldName : _ref7$mapping$fieldNa,
922
- _ref7$mapping$display = _ref7$mapping.displayName,
923
- displayName = _ref7$mapping$display === void 0 ? defaultPieSeries.mapping.displayName : _ref7$mapping$display,
924
- _ref7$color = _ref7.color,
925
- color = _ref7$color === void 0 ? defaultPieSeries.color : _ref7$color,
926
- currentColor = _ref7.currentColor;
927
- return {
928
- name: name,
929
- displayName: '系列',
930
- value: [(0, _.mapping)({
931
- fieldName: fieldName,
932
- displayName: displayName
933
- }), {
934
- name: 'color',
935
- displayName: currentColor != undefined ? '默认颜色' : '颜色',
936
- type: 'multicolor',
937
- value: (0, _.multiColor)(color),
938
- markColorType: 'seriesGradient'
939
- }, currentColor != undefined && {
940
- name: 'currentColor',
941
- displayName: '当前颜色',
942
- type: 'multicolor',
943
- value: (0, _.multiColor)(currentColor)
944
- }].filter(function (item) {
945
- return !!item;
946
- }),
947
- type: 'object'
948
- };
949
- };
950
- exports.pieSeries = pieSeries;
951
- var defaultPurePieSeries = {
952
- mapping: _mapping,
953
- color: '#fff'
954
- };
955
- var purePieSeries = function purePieSeries() {
956
- var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Math.random() + '';
957
- var _ref8 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultPurePieSeries,
958
- _ref8$mapping = _ref8.mapping;
959
- _ref8$mapping = _ref8$mapping === void 0 ? defaultPurePieSeries.mapping : _ref8$mapping;
960
- var _ref8$mapping$fieldNa = _ref8$mapping.fieldName,
961
- fieldName = _ref8$mapping$fieldNa === void 0 ? defaultPurePieSeries.mapping.fieldName : _ref8$mapping$fieldNa,
962
- _ref8$mapping$display = _ref8$mapping.displayName,
963
- displayName = _ref8$mapping$display === void 0 ? defaultPurePieSeries.mapping.displayName : _ref8$mapping$display,
964
- _ref8$color = _ref8.color,
965
- color = _ref8$color === void 0 ? defaultPurePieSeries.color : _ref8$color;
966
- return {
967
- name: name,
968
- displayName: '系列',
969
- value: [(0, _.mapping)({
970
- fieldName: fieldName,
971
- displayName: displayName
972
- }), {
973
- name: 'color',
974
- displayName: '填充',
975
- type: 'color',
976
- value: color,
977
- markColorType: 'palette'
978
- }],
979
- type: 'object'
980
- };
981
- };
982
- exports.purePieSeries = purePieSeries;