@easyv/config 1.1.3 → 1.1.6
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/.babelrc +9 -9
- package/CHANGELOG.md +17 -17
- package/index.js +3 -3
- package/lib/animation.js +1 -1
- package/lib/interaction.js +2 -2
- package/lib/mutiColor.js +51 -51
- package/lib/pie.js +47 -20
- package/package.json +30 -30
- package/src/animation.js +256 -256
- package/src/axes.js +162 -162
- package/src/axisLine.js +39 -39
- package/src/brush.js +90 -90
- package/src/dimension.js +49 -49
- package/src/extent.js +29 -29
- package/src/font.js +23 -23
- package/src/gridLine.js +49 -49
- package/src/index.js +96 -96
- package/src/interaction.js +121 -121
- package/src/label.js +722 -722
- package/src/legend.js +982 -982
- package/src/mapping.js +26 -26
- package/src/margin.js +58 -58
- package/src/multiColor.js +30 -30
- package/src/pie.js +1035 -1009
- package/src/sc.js +8 -8
- package/src/series.js +822 -822
- package/src/shadow.js +17 -17
- package/src/show.js +11 -11
- package/src/tickLine.js +51 -51
- package/src/tooltip.js +425 -425
- package/src/translate.js +27 -27
- package/src/unit.js +67 -67
package/.babelrc
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
{
|
|
2
|
-
"presets": ["@babel/preset-env", "@babel/preset-react"],
|
|
3
|
-
"plugins": [
|
|
4
|
-
"@babel/plugin-proposal-export-default-from",
|
|
5
|
-
"@babel/plugin-transform-runtime",
|
|
6
|
-
"@babel/plugin-proposal-class-properties",
|
|
7
|
-
"babel-plugin-transform-import-styles"
|
|
8
|
-
]
|
|
9
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"presets": ["@babel/preset-env", "@babel/preset-react"],
|
|
3
|
+
"plugins": [
|
|
4
|
+
"@babel/plugin-proposal-export-default-from",
|
|
5
|
+
"@babel/plugin-transform-runtime",
|
|
6
|
+
"@babel/plugin-proposal-class-properties",
|
|
7
|
+
"babel-plugin-transform-import-styles"
|
|
8
|
+
]
|
|
9
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
-
|
|
5
|
-
## [1.1.0](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/compare/v1.0.53...v1.1.0) (2022-04-27)
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
### Features
|
|
9
|
-
|
|
10
|
-
* **animation.js:** 增加数据动画配置项 ([aae17b3](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/commit/aae17b34bf57b6cd4055ee622c6830dd8d2d1dab))
|
|
11
|
-
* **animation.js:** interval配置项可选 ([8d49a7a](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/commit/8d49a7a7cefde401eb2ccf23ef68e97105baf729))
|
|
12
|
-
|
|
13
|
-
### [1.0.53](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/compare/v1.0.52...v1.0.53) (2022-04-08)
|
|
14
|
-
|
|
15
|
-
### [1.0.52](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/compare/v1.0.51...v1.0.52) (2022-04-02)
|
|
16
|
-
|
|
17
|
-
### 1.0.51 (2022-04-02)
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
|
+
|
|
5
|
+
## [1.1.0](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/compare/v1.0.53...v1.1.0) (2022-04-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **animation.js:** 增加数据动画配置项 ([aae17b3](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/commit/aae17b34bf57b6cd4055ee622c6830dd8d2d1dab))
|
|
11
|
+
* **animation.js:** interval配置项可选 ([8d49a7a](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/commit/8d49a7a7cefde401eb2ccf23ef68e97105baf729))
|
|
12
|
+
|
|
13
|
+
### [1.0.53](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/compare/v1.0.52...v1.0.53) (2022-04-08)
|
|
14
|
+
|
|
15
|
+
### [1.0.52](https://gitlab.prod.dtstack.cn:10022/visdev/visApplication/easyv-config/compare/v1.0.51...v1.0.52) (2022-04-02)
|
|
16
|
+
|
|
17
|
+
### 1.0.51 (2022-04-02)
|
package/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const config = require('./lib');
|
|
2
|
-
|
|
3
|
-
module.exports = config;
|
|
1
|
+
const config = require('./lib');
|
|
2
|
+
|
|
3
|
+
module.exports = config;
|
package/lib/animation.js
CHANGED
package/lib/interaction.js
CHANGED
package/lib/mutiColor.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var defaultMutiColor = {
|
|
8
|
-
type: 'linear',
|
|
9
|
-
pure: '#fff',
|
|
10
|
-
linear: {
|
|
11
|
-
stops: [{
|
|
12
|
-
offset: 0,
|
|
13
|
-
color: '#fff'
|
|
14
|
-
}, {
|
|
15
|
-
offset: 50,
|
|
16
|
-
color: '#ff0'
|
|
17
|
-
}, {
|
|
18
|
-
offset: 100,
|
|
19
|
-
color: '#f0f'
|
|
20
|
-
}],
|
|
21
|
-
angle: 30,
|
|
22
|
-
opacity: 1
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
var _default = function _default() {
|
|
27
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultMutiColor,
|
|
28
|
-
_ref$type = _ref.type,
|
|
29
|
-
type = _ref$type === void 0 ? defaultMutiColor.type : _ref$type,
|
|
30
|
-
_ref$pure = _ref.pure,
|
|
31
|
-
pure = _ref$pure === void 0 ? defaultMutiColor.pure : _ref$pure,
|
|
32
|
-
_ref$linear = _ref.linear;
|
|
33
|
-
|
|
34
|
-
_ref$linear = _ref$linear === void 0 ? defaultMutiColor.linear : _ref$linear;
|
|
35
|
-
var _ref$linear$stops = _ref$linear.stops,
|
|
36
|
-
stops = _ref$linear$stops === void 0 ? defaultMutiColor.linear.stops : _ref$linear$stops,
|
|
37
|
-
_ref$linear$angle = _ref$linear.angle,
|
|
38
|
-
angle = _ref$linear$angle === void 0 ? defaultMutiColor.linear.angle : _ref$linear$angle,
|
|
39
|
-
_ref$linear$opacity = _ref$linear.opacity,
|
|
40
|
-
opacity = _ref$linear$opacity === void 0 ? defaultMutiColor.linear.opacity : _ref$linear$opacity;
|
|
41
|
-
return {
|
|
42
|
-
type: type,
|
|
43
|
-
pure: pure,
|
|
44
|
-
linear: {
|
|
45
|
-
stops: stops,
|
|
46
|
-
angle: angle,
|
|
47
|
-
opacity: opacity
|
|
48
|
-
}
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var defaultMutiColor = {
|
|
8
|
+
type: 'linear',
|
|
9
|
+
pure: '#fff',
|
|
10
|
+
linear: {
|
|
11
|
+
stops: [{
|
|
12
|
+
offset: 0,
|
|
13
|
+
color: '#fff'
|
|
14
|
+
}, {
|
|
15
|
+
offset: 50,
|
|
16
|
+
color: '#ff0'
|
|
17
|
+
}, {
|
|
18
|
+
offset: 100,
|
|
19
|
+
color: '#f0f'
|
|
20
|
+
}],
|
|
21
|
+
angle: 30,
|
|
22
|
+
opacity: 1
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
var _default = function _default() {
|
|
27
|
+
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultMutiColor,
|
|
28
|
+
_ref$type = _ref.type,
|
|
29
|
+
type = _ref$type === void 0 ? defaultMutiColor.type : _ref$type,
|
|
30
|
+
_ref$pure = _ref.pure,
|
|
31
|
+
pure = _ref$pure === void 0 ? defaultMutiColor.pure : _ref$pure,
|
|
32
|
+
_ref$linear = _ref.linear;
|
|
33
|
+
|
|
34
|
+
_ref$linear = _ref$linear === void 0 ? defaultMutiColor.linear : _ref$linear;
|
|
35
|
+
var _ref$linear$stops = _ref$linear.stops,
|
|
36
|
+
stops = _ref$linear$stops === void 0 ? defaultMutiColor.linear.stops : _ref$linear$stops,
|
|
37
|
+
_ref$linear$angle = _ref$linear.angle,
|
|
38
|
+
angle = _ref$linear$angle === void 0 ? defaultMutiColor.linear.angle : _ref$linear$angle,
|
|
39
|
+
_ref$linear$opacity = _ref$linear.opacity,
|
|
40
|
+
opacity = _ref$linear$opacity === void 0 ? defaultMutiColor.linear.opacity : _ref$linear$opacity;
|
|
41
|
+
return {
|
|
42
|
+
type: type,
|
|
43
|
+
pure: pure,
|
|
44
|
+
linear: {
|
|
45
|
+
stops: stops,
|
|
46
|
+
angle: angle,
|
|
47
|
+
opacity: opacity
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
|
|
52
52
|
exports["default"] = _default;
|
package/lib/pie.js
CHANGED
|
@@ -481,10 +481,12 @@ var defaultCurrent = {
|
|
|
481
481
|
gap: 45,
|
|
482
482
|
name: {
|
|
483
483
|
show: true,
|
|
484
|
+
sameColor: false,
|
|
484
485
|
font: (0, _.font)()
|
|
485
486
|
},
|
|
486
487
|
percent: {
|
|
487
488
|
show: true,
|
|
489
|
+
sameColor: false,
|
|
488
490
|
precision: 0,
|
|
489
491
|
font: (0, _.font)(),
|
|
490
492
|
translate: {
|
|
@@ -494,6 +496,7 @@ var defaultCurrent = {
|
|
|
494
496
|
},
|
|
495
497
|
value: {
|
|
496
498
|
show: true,
|
|
499
|
+
sameColor: false,
|
|
497
500
|
font: (0, _.font)(),
|
|
498
501
|
translate: {
|
|
499
502
|
x: 0,
|
|
@@ -525,6 +528,8 @@ var current = function current() {
|
|
|
525
528
|
_ref9$current$name = _ref9$current$name === void 0 ? defaultCurrent.current.name : _ref9$current$name;
|
|
526
529
|
var _ref9$current$name$sh = _ref9$current$name.show,
|
|
527
530
|
showName = _ref9$current$name$sh === void 0 ? defaultCurrent.current.name.show : _ref9$current$name$sh,
|
|
531
|
+
_ref9$current$name$sa = _ref9$current$name.sameColor,
|
|
532
|
+
nameColor = _ref9$current$name$sa === void 0 ? defaultCurrent.current.name.sameColor : _ref9$current$name$sa,
|
|
528
533
|
_ref9$current$name$fo = _ref9$current$name.font,
|
|
529
534
|
nameFont = _ref9$current$name$fo === void 0 ? defaultCurrent.current.name.font : _ref9$current$name$fo,
|
|
530
535
|
nameTranslate = _ref9$current$name.translate,
|
|
@@ -533,36 +538,40 @@ var current = function current() {
|
|
|
533
538
|
_ref9$current$percent = _ref9$current$percent === void 0 ? defaultCurrent.current.percent : _ref9$current$percent;
|
|
534
539
|
var _ref9$current$percent2 = _ref9$current$percent.show,
|
|
535
540
|
showPercent = _ref9$current$percent2 === void 0 ? defaultCurrent.current.percent.show : _ref9$current$percent2,
|
|
536
|
-
_ref9$current$percent3 = _ref9$current$percent.
|
|
537
|
-
|
|
538
|
-
_ref9$current$percent4 = _ref9$current$percent.
|
|
539
|
-
|
|
540
|
-
_ref9$current$percent5 = _ref9$current$percent.
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
541
|
+
_ref9$current$percent3 = _ref9$current$percent.sameColor,
|
|
542
|
+
percentColor = _ref9$current$percent3 === void 0 ? defaultCurrent.current.percent.sameColor : _ref9$current$percent3,
|
|
543
|
+
_ref9$current$percent4 = _ref9$current$percent.precision,
|
|
544
|
+
precision = _ref9$current$percent4 === void 0 ? defaultCurrent.current.percent.precision : _ref9$current$percent4,
|
|
545
|
+
_ref9$current$percent5 = _ref9$current$percent.font,
|
|
546
|
+
percentFont = _ref9$current$percent5 === void 0 ? defaultCurrent.current.percent.font : _ref9$current$percent5,
|
|
547
|
+
_ref9$current$percent6 = _ref9$current$percent.translate;
|
|
548
|
+
_ref9$current$percent6 = _ref9$current$percent6 === void 0 ? defaultCurrent.current.percent.translate : _ref9$current$percent6;
|
|
549
|
+
var percentTranslateX = _ref9$current$percent6.x,
|
|
550
|
+
percentTranslateY = _ref9$current$percent6.y,
|
|
544
551
|
_ref9$current$value = _ref9$current.value;
|
|
545
552
|
_ref9$current$value = _ref9$current$value === void 0 ? defaultCurrent.current.value : _ref9$current$value;
|
|
546
553
|
var _ref9$current$value$s = _ref9$current$value.show,
|
|
547
554
|
showValue = _ref9$current$value$s === void 0 ? defaultCurrent.current.value.show : _ref9$current$value$s,
|
|
555
|
+
_ref9$current$value$s2 = _ref9$current$value.sameColor,
|
|
556
|
+
valueColor = _ref9$current$value$s2 === void 0 ? defaultCurrent.current.value.sameColor : _ref9$current$value$s2,
|
|
548
557
|
_ref9$current$value$f = _ref9$current$value.font,
|
|
549
558
|
valueFont = _ref9$current$value$f === void 0 ? defaultCurrent.current.value.font : _ref9$current$value$f,
|
|
550
559
|
_ref9$current$value$t = _ref9$current$value.translate;
|
|
551
560
|
_ref9$current$value$t = _ref9$current$value$t === void 0 ? defaultCurrent.current.value.translate : _ref9$current$value$t;
|
|
552
561
|
var valueTranslateX = _ref9$current$value$t.x,
|
|
553
562
|
valueTranslateY = _ref9$current$value$t.y,
|
|
554
|
-
_ref9$current$value$
|
|
555
|
-
_ref9$current$value$
|
|
556
|
-
var _ref9$current$value$
|
|
557
|
-
showSuffix = _ref9$current$value$
|
|
558
|
-
_ref9$current$value$
|
|
559
|
-
text = _ref9$current$value$
|
|
560
|
-
_ref9$current$value$
|
|
561
|
-
fontSize = _ref9$current$value$
|
|
562
|
-
_ref9$current$value$
|
|
563
|
-
_ref9$current$value$
|
|
564
|
-
var suffixTranslateX = _ref9$current$value$
|
|
565
|
-
suffixTranslateY = _ref9$current$value$
|
|
563
|
+
_ref9$current$value$s3 = _ref9$current$value.suffix;
|
|
564
|
+
_ref9$current$value$s3 = _ref9$current$value$s3 === void 0 ? defaultCurrent.current.value.suffix : _ref9$current$value$s3;
|
|
565
|
+
var _ref9$current$value$s4 = _ref9$current$value$s3.show,
|
|
566
|
+
showSuffix = _ref9$current$value$s4 === void 0 ? defaultCurrent.current.value.suffix.show : _ref9$current$value$s4,
|
|
567
|
+
_ref9$current$value$s5 = _ref9$current$value$s3.text,
|
|
568
|
+
text = _ref9$current$value$s5 === void 0 ? defaultCurrent.current.value.suffix.text : _ref9$current$value$s5,
|
|
569
|
+
_ref9$current$value$s6 = _ref9$current$value$s3.fontSize,
|
|
570
|
+
fontSize = _ref9$current$value$s6 === void 0 ? defaultCurrent.current.value.suffix.fontSize : _ref9$current$value$s6,
|
|
571
|
+
_ref9$current$value$s7 = _ref9$current$value$s3.translate;
|
|
572
|
+
_ref9$current$value$s7 = _ref9$current$value$s7 === void 0 ? defaultCurrent.current.value.suffix.translate : _ref9$current$value$s7;
|
|
573
|
+
var suffixTranslateX = _ref9$current$value$s7.x,
|
|
574
|
+
suffixTranslateY = _ref9$current$value$s7.y;
|
|
566
575
|
return {
|
|
567
576
|
name: 'current',
|
|
568
577
|
displayName: '当前值',
|
|
@@ -580,6 +589,12 @@ var current = function current() {
|
|
|
580
589
|
name: 'name',
|
|
581
590
|
displayName: '类目',
|
|
582
591
|
value: [(0, _.show)(showName), {
|
|
592
|
+
rule: [['show', '$eq', true]],
|
|
593
|
+
name: 'sameColor',
|
|
594
|
+
displayName: '颜色跟随',
|
|
595
|
+
value: nameColor,
|
|
596
|
+
type: 'boolean'
|
|
597
|
+
}, {
|
|
583
598
|
rule: [['show', '$eq', true]],
|
|
584
599
|
name: 'font',
|
|
585
600
|
displayName: '文本样式',
|
|
@@ -605,6 +620,12 @@ var current = function current() {
|
|
|
605
620
|
config: {
|
|
606
621
|
min: 0
|
|
607
622
|
}
|
|
623
|
+
}, {
|
|
624
|
+
rule: [['show', '$eq', true]],
|
|
625
|
+
name: 'sameColor',
|
|
626
|
+
displayName: '颜色跟随',
|
|
627
|
+
value: percentColor,
|
|
628
|
+
type: 'boolean'
|
|
608
629
|
}, {
|
|
609
630
|
rule: [['show', '$eq', true]],
|
|
610
631
|
name: 'font',
|
|
@@ -620,6 +641,12 @@ var current = function current() {
|
|
|
620
641
|
name: 'value',
|
|
621
642
|
displayName: '真实值',
|
|
622
643
|
value: [(0, _.show)(showValue), {
|
|
644
|
+
rule: [['show', '$eq', true]],
|
|
645
|
+
name: 'sameColor',
|
|
646
|
+
displayName: '颜色跟随',
|
|
647
|
+
value: valueColor,
|
|
648
|
+
type: 'boolean'
|
|
649
|
+
}, {
|
|
623
650
|
rule: [['show', '$eq', true]],
|
|
624
651
|
name: 'font',
|
|
625
652
|
displayName: '文本样式',
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@easyv/config",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"make": "babel src -d lib",
|
|
8
|
-
"release": "standard-version"
|
|
9
|
-
},
|
|
10
|
-
"keywords": [],
|
|
11
|
-
"author": "",
|
|
12
|
-
"license": "ISC",
|
|
13
|
-
"devDependencies": {
|
|
14
|
-
"@babel/cli": "^7.6.0",
|
|
15
|
-
"@babel/core": "^7.11.5",
|
|
16
|
-
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
|
17
|
-
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
|
18
|
-
"@babel/plugin-transform-runtime": "^7.11.5",
|
|
19
|
-
"@babel/preset-env": "^7.11.5",
|
|
20
|
-
"@babel/preset-react": "^7.10.4",
|
|
21
|
-
"@babel/runtime": "^7.17.7",
|
|
22
|
-
"babel-plugin-transform-import-styles": "0.0.11",
|
|
23
|
-
"babel-preset-env": "^1.7.0",
|
|
24
|
-
"standard-version": "^9.3.2"
|
|
25
|
-
},
|
|
26
|
-
"standard-version": {
|
|
27
|
-
"skip": {
|
|
28
|
-
"commit": true
|
|
29
|
-
}
|
|
30
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@easyv/config",
|
|
3
|
+
"version": "1.1.6",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"make": "babel src -d lib",
|
|
8
|
+
"release": "standard-version"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"@babel/cli": "^7.6.0",
|
|
15
|
+
"@babel/core": "^7.11.5",
|
|
16
|
+
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
|
17
|
+
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
|
18
|
+
"@babel/plugin-transform-runtime": "^7.11.5",
|
|
19
|
+
"@babel/preset-env": "^7.11.5",
|
|
20
|
+
"@babel/preset-react": "^7.10.4",
|
|
21
|
+
"@babel/runtime": "^7.17.7",
|
|
22
|
+
"babel-plugin-transform-import-styles": "0.0.11",
|
|
23
|
+
"babel-preset-env": "^1.7.0",
|
|
24
|
+
"standard-version": "^9.3.2"
|
|
25
|
+
},
|
|
26
|
+
"standard-version": {
|
|
27
|
+
"skip": {
|
|
28
|
+
"commit": true
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
31
|
}
|