@easyv/config 1.0.37 → 1.0.38
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/animation.js +15 -35
- package/lib/axes.js +7 -4
- package/lib/index.js +21 -1
- package/lib/label.js +5 -5
- package/lib/legend.js +23 -38
- package/lib/mutiColor.js +52 -0
- package/lib/pie.js +212 -102
- package/lib/show.js +13 -2
- package/package.json +1 -1
- package/src/animation.js +18 -28
- package/src/axes.js +3 -3
- package/src/index.js +6 -2
- package/src/label.js +3 -4
- package/src/legend.js +19 -16
- package/src/mutiColor.js +31 -0
- package/src/pie.js +112 -10
- package/src/show.js +6 -0
package/lib/pie.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] = exports.carouselDonut2 = exports.carouselDonut = exports.donut = exports.rosePie = void 0;
|
|
8
|
+
exports["default"] = exports.carouselDonut2 = exports.carouselDonut = exports.donut = exports.rosePieDecorate = exports.rosePie = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -89,7 +89,8 @@ var basePie = function basePie() {
|
|
|
89
89
|
var defaultCategoryText = {
|
|
90
90
|
categoryText: {
|
|
91
91
|
show: true,
|
|
92
|
-
font: (0, _.font)()
|
|
92
|
+
font: (0, _.font)(),
|
|
93
|
+
gap: 10
|
|
93
94
|
}
|
|
94
95
|
};
|
|
95
96
|
|
|
@@ -97,9 +98,11 @@ var categoryText = function categoryText(_ref2) {
|
|
|
97
98
|
var _ref2$categoryText = _ref2.categoryText;
|
|
98
99
|
_ref2$categoryText = _ref2$categoryText === void 0 ? defaultCategoryText : _ref2$categoryText;
|
|
99
100
|
var _ref2$categoryText$sh = _ref2$categoryText.show,
|
|
100
|
-
show = _ref2$categoryText$sh === void 0 ? defaultCategoryText.show : _ref2$categoryText$sh,
|
|
101
|
+
show = _ref2$categoryText$sh === void 0 ? defaultCategoryText.categoryText.show : _ref2$categoryText$sh,
|
|
101
102
|
_ref2$categoryText$fo = _ref2$categoryText.font,
|
|
102
|
-
font = _ref2$categoryText$fo === void 0 ? defaultCategoryText.font : _ref2$categoryText$fo
|
|
103
|
+
font = _ref2$categoryText$fo === void 0 ? defaultCategoryText.categoryText.font : _ref2$categoryText$fo,
|
|
104
|
+
_ref2$categoryText$ga = _ref2$categoryText.gap,
|
|
105
|
+
gap = _ref2$categoryText$ga === void 0 ? defaultCategoryText.categoryText.gap : _ref2$categoryText$ga;
|
|
103
106
|
return {
|
|
104
107
|
name: 'categoryText',
|
|
105
108
|
displayName: '类目文本',
|
|
@@ -108,13 +111,20 @@ var categoryText = function categoryText(_ref2) {
|
|
|
108
111
|
displayName: '显示',
|
|
109
112
|
value: show,
|
|
110
113
|
type: 'boolean'
|
|
111
|
-
}, {
|
|
112
|
-
rule: [['show', '$eq', true]],
|
|
114
|
+
}, _objectSpread(_objectSpread({}, (0, _.showRule)()), {}, {
|
|
113
115
|
name: 'textStyle',
|
|
114
116
|
displayName: '文本样式',
|
|
115
117
|
value: font,
|
|
116
118
|
type: "textStyle"
|
|
117
|
-
}
|
|
119
|
+
}), _objectSpread(_objectSpread({}, (0, _.showRule)()), {}, {
|
|
120
|
+
name: 'gap',
|
|
121
|
+
displayName: '间距',
|
|
122
|
+
value: gap,
|
|
123
|
+
type: 'number',
|
|
124
|
+
config: {
|
|
125
|
+
suffix: "px"
|
|
126
|
+
}
|
|
127
|
+
})]
|
|
118
128
|
};
|
|
119
129
|
};
|
|
120
130
|
|
|
@@ -263,6 +273,92 @@ var decorate2 = function decorate2(_ref4) {
|
|
|
263
273
|
};
|
|
264
274
|
};
|
|
265
275
|
|
|
276
|
+
var defaultOuterDecorate = {
|
|
277
|
+
color: "#CF00FF",
|
|
278
|
+
width: 10,
|
|
279
|
+
tick: {
|
|
280
|
+
show: true,
|
|
281
|
+
count: 12,
|
|
282
|
+
color: "#CF00FF",
|
|
283
|
+
width: 3,
|
|
284
|
+
length: 8
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
var outerDecorate = function outerDecorate() {
|
|
289
|
+
var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultOuterDecorate,
|
|
290
|
+
_ref5$color = _ref5.color,
|
|
291
|
+
color = _ref5$color === void 0 ? defaultOuterDecorate.color : _ref5$color,
|
|
292
|
+
_ref5$width = _ref5.width,
|
|
293
|
+
width = _ref5$width === void 0 ? defaultOuterDecorate.width : _ref5$width,
|
|
294
|
+
_ref5$tick = _ref5.tick;
|
|
295
|
+
|
|
296
|
+
_ref5$tick = _ref5$tick === void 0 ? defaultOuterDecorate.tick : _ref5$tick;
|
|
297
|
+
var _ref5$tick$show = _ref5$tick.show,
|
|
298
|
+
show = _ref5$tick$show === void 0 ? defaultOuterDecorate.tick.show : _ref5$tick$show,
|
|
299
|
+
_ref5$tick$count = _ref5$tick.count,
|
|
300
|
+
count = _ref5$tick$count === void 0 ? defaultOuterDecorate.tick.count : _ref5$tick$count,
|
|
301
|
+
_ref5$tick$color = _ref5$tick.color,
|
|
302
|
+
tickColor = _ref5$tick$color === void 0 ? defaultOuterDecorate.tick.color : _ref5$tick$color,
|
|
303
|
+
_ref5$tick$width = _ref5$tick.width,
|
|
304
|
+
tickWidth = _ref5$tick$width === void 0 ? defaultOuterDecorate.tick.width : _ref5$tick$width,
|
|
305
|
+
_ref5$tick$length = _ref5$tick.length,
|
|
306
|
+
length = _ref5$tick$length === void 0 ? defaultOuterDecorate.tick.length : _ref5$tick$length;
|
|
307
|
+
return {
|
|
308
|
+
name: 'outerDecorate',
|
|
309
|
+
displayName: '外环装饰',
|
|
310
|
+
value: [{
|
|
311
|
+
name: 'color',
|
|
312
|
+
displayName: '颜色',
|
|
313
|
+
value: color,
|
|
314
|
+
type: 'color'
|
|
315
|
+
}, {
|
|
316
|
+
name: "width",
|
|
317
|
+
displayName: "粗细",
|
|
318
|
+
value: width,
|
|
319
|
+
type: "number",
|
|
320
|
+
config: {
|
|
321
|
+
min: 0,
|
|
322
|
+
max: 100,
|
|
323
|
+
suffix: "px"
|
|
324
|
+
}
|
|
325
|
+
}, {
|
|
326
|
+
name: 'tick',
|
|
327
|
+
displayName: '刻度',
|
|
328
|
+
value: [(0, _.show)(show), _objectSpread(_objectSpread({}, (0, _.showRule)()), {}, {
|
|
329
|
+
name: "count",
|
|
330
|
+
displayName: "个数",
|
|
331
|
+
value: count,
|
|
332
|
+
type: "number",
|
|
333
|
+
config: {
|
|
334
|
+
min: 0
|
|
335
|
+
}
|
|
336
|
+
}), _objectSpread(_objectSpread({}, (0, _.showRule)()), {}, {
|
|
337
|
+
name: "color",
|
|
338
|
+
displayName: "颜色",
|
|
339
|
+
value: tickColor,
|
|
340
|
+
type: "color"
|
|
341
|
+
}), _objectSpread(_objectSpread({}, (0, _.showRule)()), {}, {
|
|
342
|
+
name: "width",
|
|
343
|
+
displayName: "粗细",
|
|
344
|
+
value: tickWidth,
|
|
345
|
+
type: "number",
|
|
346
|
+
config: {
|
|
347
|
+
suffix: "px"
|
|
348
|
+
}
|
|
349
|
+
}), _objectSpread(_objectSpread({}, (0, _.showRule)()), {}, {
|
|
350
|
+
name: "length",
|
|
351
|
+
displayName: "长度",
|
|
352
|
+
value: length,
|
|
353
|
+
type: "number",
|
|
354
|
+
config: {
|
|
355
|
+
suffix: "px"
|
|
356
|
+
}
|
|
357
|
+
})]
|
|
358
|
+
}]
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
|
|
266
362
|
var defaultCurrent = {
|
|
267
363
|
current: {
|
|
268
364
|
show: true,
|
|
@@ -301,54 +397,54 @@ var defaultCurrent = {
|
|
|
301
397
|
};
|
|
302
398
|
|
|
303
399
|
var current = function current() {
|
|
304
|
-
var
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
var
|
|
309
|
-
show =
|
|
310
|
-
|
|
311
|
-
gap =
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
var
|
|
315
|
-
showName =
|
|
316
|
-
|
|
317
|
-
nameFont =
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
var
|
|
321
|
-
showPercent =
|
|
322
|
-
|
|
323
|
-
precision =
|
|
324
|
-
|
|
325
|
-
percentFont =
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
var percentTranslateX =
|
|
329
|
-
percentTranslateY =
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
var
|
|
333
|
-
showValue =
|
|
334
|
-
|
|
335
|
-
valueFont =
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
var valueTranslateX =
|
|
339
|
-
valueTranslateY =
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
var
|
|
343
|
-
showSuffix =
|
|
344
|
-
|
|
345
|
-
text =
|
|
346
|
-
|
|
347
|
-
fontSize =
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
var suffixTranslateX =
|
|
351
|
-
suffixTranslateY =
|
|
400
|
+
var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultCurrent,
|
|
401
|
+
_ref6$current = _ref6.current;
|
|
402
|
+
|
|
403
|
+
_ref6$current = _ref6$current === void 0 ? defaultCurrent.current : _ref6$current;
|
|
404
|
+
var _ref6$current$show = _ref6$current.show,
|
|
405
|
+
show = _ref6$current$show === void 0 ? defaultCurrent.current.show : _ref6$current$show,
|
|
406
|
+
_ref6$current$gap = _ref6$current.gap,
|
|
407
|
+
gap = _ref6$current$gap === void 0 ? defaultCurrent.current.gap : _ref6$current$gap,
|
|
408
|
+
_ref6$current$name = _ref6$current.name;
|
|
409
|
+
_ref6$current$name = _ref6$current$name === void 0 ? defaultCurrent.current.name : _ref6$current$name;
|
|
410
|
+
var _ref6$current$name$sh = _ref6$current$name.show,
|
|
411
|
+
showName = _ref6$current$name$sh === void 0 ? defaultCurrent.current.name.show : _ref6$current$name$sh,
|
|
412
|
+
_ref6$current$name$fo = _ref6$current$name.font,
|
|
413
|
+
nameFont = _ref6$current$name$fo === void 0 ? defaultCurrent.current.name.font : _ref6$current$name$fo,
|
|
414
|
+
_ref6$current$percent = _ref6$current.percent;
|
|
415
|
+
_ref6$current$percent = _ref6$current$percent === void 0 ? defaultCurrent.current.percent : _ref6$current$percent;
|
|
416
|
+
var _ref6$current$percent2 = _ref6$current$percent.show,
|
|
417
|
+
showPercent = _ref6$current$percent2 === void 0 ? defaultCurrent.current.percent.show : _ref6$current$percent2,
|
|
418
|
+
_ref6$current$percent3 = _ref6$current$percent.precision,
|
|
419
|
+
precision = _ref6$current$percent3 === void 0 ? defaultCurrent.current.percent.precision : _ref6$current$percent3,
|
|
420
|
+
_ref6$current$percent4 = _ref6$current$percent.font,
|
|
421
|
+
percentFont = _ref6$current$percent4 === void 0 ? defaultCurrent.current.percent.font : _ref6$current$percent4,
|
|
422
|
+
_ref6$current$percent5 = _ref6$current$percent.translate;
|
|
423
|
+
_ref6$current$percent5 = _ref6$current$percent5 === void 0 ? defaultCurrent.current.percent.translate : _ref6$current$percent5;
|
|
424
|
+
var percentTranslateX = _ref6$current$percent5.x,
|
|
425
|
+
percentTranslateY = _ref6$current$percent5.y,
|
|
426
|
+
_ref6$current$value = _ref6$current.value;
|
|
427
|
+
_ref6$current$value = _ref6$current$value === void 0 ? defaultCurrent.current.value : _ref6$current$value;
|
|
428
|
+
var _ref6$current$value$s = _ref6$current$value.show,
|
|
429
|
+
showValue = _ref6$current$value$s === void 0 ? defaultCurrent.current.value.show : _ref6$current$value$s,
|
|
430
|
+
_ref6$current$value$f = _ref6$current$value.font,
|
|
431
|
+
valueFont = _ref6$current$value$f === void 0 ? defaultCurrent.current.value.font : _ref6$current$value$f,
|
|
432
|
+
_ref6$current$value$t = _ref6$current$value.translate;
|
|
433
|
+
_ref6$current$value$t = _ref6$current$value$t === void 0 ? defaultCurrent.current.value.translate : _ref6$current$value$t;
|
|
434
|
+
var valueTranslateX = _ref6$current$value$t.x,
|
|
435
|
+
valueTranslateY = _ref6$current$value$t.y,
|
|
436
|
+
_ref6$current$value$s2 = _ref6$current$value.suffix;
|
|
437
|
+
_ref6$current$value$s2 = _ref6$current$value$s2 === void 0 ? defaultCurrent.current.value.suffix : _ref6$current$value$s2;
|
|
438
|
+
var _ref6$current$value$s3 = _ref6$current$value$s2.show,
|
|
439
|
+
showSuffix = _ref6$current$value$s3 === void 0 ? defaultCurrent.current.value.suffix.show : _ref6$current$value$s3,
|
|
440
|
+
_ref6$current$value$s4 = _ref6$current$value$s2.text,
|
|
441
|
+
text = _ref6$current$value$s4 === void 0 ? defaultCurrent.current.value.suffix.text : _ref6$current$value$s4,
|
|
442
|
+
_ref6$current$value$s5 = _ref6$current$value$s2.fontSize,
|
|
443
|
+
fontSize = _ref6$current$value$s5 === void 0 ? defaultCurrent.current.value.suffix.fontSize : _ref6$current$value$s5,
|
|
444
|
+
_ref6$current$value$s6 = _ref6$current$value$s2.translate;
|
|
445
|
+
_ref6$current$value$s6 = _ref6$current$value$s6 === void 0 ? defaultCurrent.current.value.suffix.translate : _ref6$current$value$s6;
|
|
446
|
+
var suffixTranslateX = _ref6$current$value$s6.x,
|
|
447
|
+
suffixTranslateY = _ref6$current$value$s6.y;
|
|
352
448
|
return {
|
|
353
449
|
name: 'current',
|
|
354
450
|
displayName: '当前值',
|
|
@@ -453,15 +549,29 @@ var rosePie = function rosePie() {
|
|
|
453
549
|
|
|
454
550
|
exports.rosePie = rosePie;
|
|
455
551
|
|
|
552
|
+
var rosePieDecorate = function rosePieDecorate() {
|
|
553
|
+
var _basePie = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultBasePie;
|
|
554
|
+
|
|
555
|
+
var _outerDecorate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultOuterDecorate;
|
|
556
|
+
|
|
557
|
+
return {
|
|
558
|
+
name: ' fan',
|
|
559
|
+
displayName: '环图属性',
|
|
560
|
+
value: [basePie(_basePie), outerDecorate(_outerDecorate)]
|
|
561
|
+
};
|
|
562
|
+
};
|
|
563
|
+
|
|
564
|
+
exports.rosePieDecorate = rosePieDecorate;
|
|
565
|
+
|
|
456
566
|
var donut = function donut() {
|
|
457
|
-
var
|
|
567
|
+
var _ref7 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
458
568
|
basePie: defaultBasePie,
|
|
459
569
|
decorate: defaultDecorate
|
|
460
570
|
},
|
|
461
|
-
|
|
462
|
-
_basePie =
|
|
463
|
-
|
|
464
|
-
_decorate =
|
|
571
|
+
_ref7$basePie = _ref7.basePie,
|
|
572
|
+
_basePie = _ref7$basePie === void 0 ? defaultBasePie : _ref7$basePie,
|
|
573
|
+
_ref7$decorate = _ref7.decorate,
|
|
574
|
+
_decorate = _ref7$decorate === void 0 ? defaultDecorate : _ref7$decorate;
|
|
465
575
|
|
|
466
576
|
return {
|
|
467
577
|
name: 'fan',
|
|
@@ -473,14 +583,14 @@ var donut = function donut() {
|
|
|
473
583
|
exports.donut = donut;
|
|
474
584
|
|
|
475
585
|
var carouselDonut = function carouselDonut() {
|
|
476
|
-
var
|
|
586
|
+
var _ref8 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
477
587
|
basePie: defaultBasePie,
|
|
478
588
|
current: defaultCurrent
|
|
479
589
|
},
|
|
480
|
-
|
|
481
|
-
_basePie =
|
|
482
|
-
|
|
483
|
-
_current =
|
|
590
|
+
_ref8$basePie = _ref8.basePie,
|
|
591
|
+
_basePie = _ref8$basePie === void 0 ? defaultBasePie : _ref8$basePie,
|
|
592
|
+
_ref8$current = _ref8.current,
|
|
593
|
+
_current = _ref8$current === void 0 ? defaultCurrent : _ref8$current;
|
|
484
594
|
|
|
485
595
|
return {
|
|
486
596
|
name: 'fan',
|
|
@@ -492,20 +602,20 @@ var carouselDonut = function carouselDonut() {
|
|
|
492
602
|
exports.carouselDonut = carouselDonut;
|
|
493
603
|
|
|
494
604
|
var carouselDonut2 = function carouselDonut2() {
|
|
495
|
-
var
|
|
605
|
+
var _ref9 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
|
|
496
606
|
basePie: defaultBasePie,
|
|
497
607
|
categoryText: defaultCategoryText,
|
|
498
608
|
decorate2: defaultDecorate2,
|
|
499
609
|
current: defaultCurrent
|
|
500
610
|
},
|
|
501
|
-
|
|
502
|
-
_basePie =
|
|
503
|
-
|
|
504
|
-
_categoryText =
|
|
505
|
-
|
|
506
|
-
_decorate2 =
|
|
507
|
-
|
|
508
|
-
_current =
|
|
611
|
+
_ref9$basePie = _ref9.basePie,
|
|
612
|
+
_basePie = _ref9$basePie === void 0 ? defaultBasePie : _ref9$basePie,
|
|
613
|
+
_ref9$categoryText = _ref9.categoryText,
|
|
614
|
+
_categoryText = _ref9$categoryText === void 0 ? defaultCategoryText : _ref9$categoryText,
|
|
615
|
+
_ref9$decorate = _ref9.decorate2,
|
|
616
|
+
_decorate2 = _ref9$decorate === void 0 ? defaultDecorate2 : _ref9$decorate,
|
|
617
|
+
_ref9$current = _ref9.current,
|
|
618
|
+
_current = _ref9$current === void 0 ? defaultCurrent : _ref9$current;
|
|
509
619
|
|
|
510
620
|
return {
|
|
511
621
|
name: 'fan',
|
|
@@ -537,34 +647,34 @@ var defaultPie = {
|
|
|
537
647
|
};
|
|
538
648
|
|
|
539
649
|
var _default = function _default() {
|
|
540
|
-
var
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
var
|
|
545
|
-
|
|
546
|
-
var
|
|
547
|
-
outerRadius =
|
|
548
|
-
|
|
549
|
-
rose =
|
|
550
|
-
|
|
551
|
-
baseRadius =
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
var
|
|
555
|
-
startAngle =
|
|
556
|
-
|
|
557
|
-
endAngle =
|
|
558
|
-
|
|
559
|
-
antiClockwise =
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
var
|
|
563
|
-
show =
|
|
564
|
-
|
|
565
|
-
strokeWidth =
|
|
566
|
-
|
|
567
|
-
color =
|
|
650
|
+
var _ref10 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultPie,
|
|
651
|
+
_ref10$fan = _ref10.fan;
|
|
652
|
+
|
|
653
|
+
_ref10$fan = _ref10$fan === void 0 ? defaultPie.fan : _ref10$fan;
|
|
654
|
+
var _ref10$fan$chart = _ref10$fan.chart;
|
|
655
|
+
_ref10$fan$chart = _ref10$fan$chart === void 0 ? defaultPie.fan.chart : _ref10$fan$chart;
|
|
656
|
+
var _ref10$fan$chart$oute = _ref10$fan$chart.outerRadius,
|
|
657
|
+
outerRadius = _ref10$fan$chart$oute === void 0 ? defaultPie.fan.chart.outerRadius : _ref10$fan$chart$oute,
|
|
658
|
+
_ref10$fan$chart$rose = _ref10$fan$chart.rose,
|
|
659
|
+
rose = _ref10$fan$chart$rose === void 0 ? defaultPie.fan.chart.rose : _ref10$fan$chart$rose,
|
|
660
|
+
_ref10$fan$chart$base = _ref10$fan$chart.baseRadius,
|
|
661
|
+
baseRadius = _ref10$fan$chart$base === void 0 ? defaultPie.fan.chart.baseRadius : _ref10$fan$chart$base,
|
|
662
|
+
_ref10$fan$angle = _ref10$fan.angle;
|
|
663
|
+
_ref10$fan$angle = _ref10$fan$angle === void 0 ? defaultPie.fan.angle : _ref10$fan$angle;
|
|
664
|
+
var _ref10$fan$angle$star = _ref10$fan$angle.startAngle,
|
|
665
|
+
startAngle = _ref10$fan$angle$star === void 0 ? defaultPie.fan.angle.startAngle : _ref10$fan$angle$star,
|
|
666
|
+
_ref10$fan$angle$endA = _ref10$fan$angle.endAngle,
|
|
667
|
+
endAngle = _ref10$fan$angle$endA === void 0 ? defaultPie.fan.angle.endAngle : _ref10$fan$angle$endA,
|
|
668
|
+
_ref10$fan$angle$anti = _ref10$fan$angle.antiClockwise,
|
|
669
|
+
antiClockwise = _ref10$fan$angle$anti === void 0 ? defaultPie.fan.angle.antiClockwise : _ref10$fan$angle$anti,
|
|
670
|
+
_ref10$fan$stroke = _ref10$fan.stroke;
|
|
671
|
+
_ref10$fan$stroke = _ref10$fan$stroke === void 0 ? defaultPie.fan.stroke : _ref10$fan$stroke;
|
|
672
|
+
var _ref10$fan$stroke$sho = _ref10$fan$stroke.show,
|
|
673
|
+
show = _ref10$fan$stroke$sho === void 0 ? defaultPie.fan.stroke.show : _ref10$fan$stroke$sho,
|
|
674
|
+
_ref10$fan$stroke$str = _ref10$fan$stroke.strokeWidth,
|
|
675
|
+
strokeWidth = _ref10$fan$stroke$str === void 0 ? defaultPie.fan.stroke.strokeWidth : _ref10$fan$stroke$str,
|
|
676
|
+
_ref10$fan$stroke$col = _ref10$fan$stroke.color,
|
|
677
|
+
color = _ref10$fan$stroke$col === void 0 ? defaultPie.fan.stroke.color : _ref10$fan$stroke$col;
|
|
568
678
|
return {
|
|
569
679
|
name: 'fan',
|
|
570
680
|
displayName: '饼图属性',
|
package/lib/show.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = void 0;
|
|
6
|
+
exports.showRule = exports["default"] = void 0;
|
|
7
7
|
|
|
8
8
|
var _default = function _default() {
|
|
9
9
|
var show = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -14,4 +14,15 @@ var _default = function _default() {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
exports["default"] = _default;
|
|
17
|
+
exports["default"] = _default;
|
|
18
|
+
|
|
19
|
+
var showRule = function showRule() {
|
|
20
|
+
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "show";
|
|
21
|
+
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "$eq";
|
|
22
|
+
var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
23
|
+
return {
|
|
24
|
+
rule: [[name, type, value]]
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.showRule = showRule;
|
package/package.json
CHANGED
package/src/animation.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mutiColor } from './';
|
|
2
2
|
const animation = {
|
|
3
3
|
show: false,
|
|
4
4
|
duration: 3,
|
|
@@ -126,33 +126,23 @@ const defaultAnimationOfCarousel= {
|
|
|
126
126
|
show: true,
|
|
127
127
|
current: {
|
|
128
128
|
width: 0.1,
|
|
129
|
-
color:
|
|
130
|
-
|
|
131
|
-
pure: '#fff',
|
|
132
|
-
linear: {
|
|
133
|
-
stops: [
|
|
134
|
-
{ offset: 0, color: '#fff' },
|
|
135
|
-
{ offset: 50, color: '#ff0' },
|
|
136
|
-
{ offset: 100, color: '#f0f' }
|
|
137
|
-
],
|
|
138
|
-
angle: 30,
|
|
139
|
-
opacity: 1
|
|
140
|
-
}
|
|
141
|
-
}
|
|
129
|
+
color: mutiColor(),
|
|
130
|
+
gap: 15
|
|
142
131
|
},
|
|
143
132
|
interval: 3,
|
|
144
133
|
rotate: 30,
|
|
145
|
-
interactive:
|
|
134
|
+
interactive: true,
|
|
146
135
|
};
|
|
147
136
|
export const animationOfCarousel= ({
|
|
148
137
|
show = defaultAnimationOfCarousel.show,
|
|
149
138
|
current: {
|
|
150
139
|
width = defaultAnimationOfCarousel.current.width,
|
|
151
140
|
color = defaultAnimationOfCarousel.current.color,
|
|
141
|
+
gap = defaultAnimationOfCarousel.current.gap
|
|
152
142
|
} = defaultAnimationOfCarousel.current,
|
|
153
143
|
interval = defaultAnimationOfCarousel.interval,
|
|
154
144
|
rotate = defaultAnimationOfCarousel.rotate,
|
|
155
|
-
interactive = defaultAnimationOfCarousel.interactive
|
|
145
|
+
interactive = defaultAnimationOfCarousel.interactive
|
|
156
146
|
} = defaultAnimationOfCarousel) => ({
|
|
157
147
|
name: 'animation',
|
|
158
148
|
displayName: '轮播动画',
|
|
@@ -180,6 +170,15 @@ export const animationOfCarousel= ({
|
|
|
180
170
|
value: color,
|
|
181
171
|
type: 'multicolor',
|
|
182
172
|
},
|
|
173
|
+
{
|
|
174
|
+
name: 'gap',
|
|
175
|
+
displayName: '类目文本间距',
|
|
176
|
+
value: gap,
|
|
177
|
+
type: 'number',
|
|
178
|
+
config:{
|
|
179
|
+
suffix:"px"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
183
182
|
],
|
|
184
183
|
config: {
|
|
185
184
|
defaultOpen: true,
|
|
@@ -208,19 +207,10 @@ export const animationOfCarousel= ({
|
|
|
208
207
|
},
|
|
209
208
|
},
|
|
210
209
|
{
|
|
211
|
-
tip: '选择点击或悬浮,鼠标点击/悬浮各数据块时停止轮播仅显示当前数据信息',
|
|
212
|
-
rule: [['on', '$eq', true]],
|
|
213
210
|
name: 'interactive',
|
|
214
|
-
displayName: '
|
|
211
|
+
displayName: '点击交互',
|
|
215
212
|
value: interactive,
|
|
216
|
-
type:
|
|
217
|
-
|
|
218
|
-
options: [
|
|
219
|
-
{ name: '无', value: '' },
|
|
220
|
-
{ name: '点击', value: 'click' },
|
|
221
|
-
{ name: '悬停', value: 'hover' },
|
|
222
|
-
],
|
|
223
|
-
},
|
|
224
|
-
},
|
|
213
|
+
type:"boolean"
|
|
214
|
+
}
|
|
225
215
|
],
|
|
226
216
|
});
|
package/src/axes.js
CHANGED
|
@@ -29,12 +29,12 @@ const defaultCategoryAxis = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export const categoryAxis = ({
|
|
32
|
-
on =
|
|
32
|
+
on = defaultCategoryAxis.on,
|
|
33
33
|
label = defaultCategoryAxis.label,
|
|
34
34
|
axisLine: axisLine_ = defaultCategoryAxis.axisLine,
|
|
35
35
|
tickLine: tickLine_ = defaultCategoryAxis.tickLine,
|
|
36
36
|
gridLine: gridLine_ = defaultCategoryAxis.gridLine,
|
|
37
|
-
}) => [
|
|
37
|
+
} = defaultCategoryAxis) => [
|
|
38
38
|
{
|
|
39
39
|
name: 'on',
|
|
40
40
|
displayName: '启用',
|
|
@@ -95,7 +95,7 @@ const defaultValueAxis = {
|
|
|
95
95
|
};
|
|
96
96
|
|
|
97
97
|
export const valueAxis = ({
|
|
98
|
-
on,
|
|
98
|
+
on = defaultValueAxis.on,
|
|
99
99
|
label = defaultValueAxis.label,
|
|
100
100
|
unit: unit_ = defaultValueAxis.unit,
|
|
101
101
|
axisLine: axisLine_ = defaultValueAxis.axisLine,
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import show from './show';
|
|
1
|
+
import show, {showRule} from './show';
|
|
2
2
|
import font from './font';
|
|
3
3
|
import translate from './translate';
|
|
4
4
|
import gridLine from './gridLine';
|
|
@@ -7,6 +7,7 @@ import axisLine from './axisLine';
|
|
|
7
7
|
import extent from './extent';
|
|
8
8
|
import unit from './unit';
|
|
9
9
|
import margin from './margin';
|
|
10
|
+
import mutiColor from './mutiColor';
|
|
10
11
|
import animation, { animationOfPie, animationOfCarousel } from './animation';
|
|
11
12
|
import dimension from './dimension';
|
|
12
13
|
import label, { labelOfPie, axisLabel } from './label';
|
|
@@ -15,18 +16,20 @@ import tooltip from './tooltip';
|
|
|
15
16
|
import axes, { valueAxis, categoryAxis } from './axes';
|
|
16
17
|
import mapping from './mapping';
|
|
17
18
|
import { bandSeries, lineSeries, areaSeries, pieSeries } from './series';
|
|
18
|
-
import pie, { rosePie, donut, carouselDonut, carouselDonut2 } from './pie';
|
|
19
|
+
import pie, { rosePie, rosePieDecorate, donut, carouselDonut, carouselDonut2 } from './pie';
|
|
19
20
|
import brush from './brush';
|
|
20
21
|
import interaction from './interaction';
|
|
21
22
|
|
|
22
23
|
export {
|
|
23
24
|
show,
|
|
25
|
+
showRule,
|
|
24
26
|
font,
|
|
25
27
|
tooltip,
|
|
26
28
|
translate,
|
|
27
29
|
extent,
|
|
28
30
|
unit,
|
|
29
31
|
margin,
|
|
32
|
+
mutiColor,
|
|
30
33
|
animation,
|
|
31
34
|
animationOfPie,
|
|
32
35
|
animationOfCarousel,
|
|
@@ -52,6 +55,7 @@ export {
|
|
|
52
55
|
axisLabel,
|
|
53
56
|
pie,
|
|
54
57
|
rosePie,
|
|
58
|
+
rosePieDecorate,
|
|
55
59
|
donut,
|
|
56
60
|
carouselDonut,
|
|
57
61
|
carouselDonut2
|
package/src/label.js
CHANGED
|
@@ -98,7 +98,7 @@ export const labelOfPie = ({
|
|
|
98
98
|
show = defaultLabelOfPie.show,
|
|
99
99
|
distance = defaultLabelOfPie.distance,
|
|
100
100
|
lineLength = defaultLabelOfPie.lineLength,
|
|
101
|
-
lineColor
|
|
101
|
+
lineColor, //这个是可选项,如果不在main.js里赋值,就不会出现
|
|
102
102
|
mode = defaultLabelOfPie.mode,
|
|
103
103
|
translate: { x, y } = defaultLabelOfPie.show,
|
|
104
104
|
name: {
|
|
@@ -155,8 +155,7 @@ export const labelOfPie = ({
|
|
|
155
155
|
step: 1,
|
|
156
156
|
},
|
|
157
157
|
},
|
|
158
|
-
{
|
|
159
|
-
rule:[['show', '$eq', lineColor?true:"123456789"]],
|
|
158
|
+
lineColor !==undefined && {
|
|
160
159
|
name:"lineColor",
|
|
161
160
|
displayName:"线颜色",
|
|
162
161
|
value:lineColor,
|
|
@@ -288,7 +287,7 @@ export const labelOfPie = ({
|
|
|
288
287
|
},
|
|
289
288
|
],
|
|
290
289
|
},
|
|
291
|
-
],
|
|
290
|
+
].filter((item) => !!item),
|
|
292
291
|
});
|
|
293
292
|
|
|
294
293
|
const defaultAxisLabel = {
|