@easyv/config 1.0.43 → 1.0.47
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/index.js +3 -3
- package/lib/index.js +8 -2
- package/lib/interaction.js +2 -2
- package/lib/legend.js +90 -67
- package/lib/pie.js +10 -2
- package/lib/series.js +46 -2
- package/lib/tooltip.js +124 -11
- package/package.json +23 -23
- package/src/animation.js +224 -224
- package/src/axes.js +162 -162
- package/src/axisLine.js +38 -38
- 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 +48 -48
- package/src/index.js +72 -71
- package/src/interaction.js +121 -121
- package/src/label.js +707 -707
- package/src/legend.js +968 -954
- package/src/mapping.js +26 -26
- package/src/margin.js +58 -58
- package/src/multiColor.js +30 -30
- package/src/pie.js +978 -968
- package/src/sc.js +8 -8
- package/src/series.js +684 -631
- package/src/shadow.js +17 -17
- package/src/show.js +11 -11
- package/src/tickLine.js +50 -50
- package/src/tooltip.js +421 -288
- package/src/translate.js +27 -27
- package/src/unit.js +66 -66
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/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/index.js
CHANGED
|
@@ -145,10 +145,10 @@ Object.defineProperty(exports, "legendOfRose", {
|
|
|
145
145
|
return _legend.legendOfRose;
|
|
146
146
|
}
|
|
147
147
|
});
|
|
148
|
-
Object.defineProperty(exports, "
|
|
148
|
+
Object.defineProperty(exports, "legendOfDoublePie", {
|
|
149
149
|
enumerable: true,
|
|
150
150
|
get: function get() {
|
|
151
|
-
return _legend.
|
|
151
|
+
return _legend.legendOfDoublePie;
|
|
152
152
|
}
|
|
153
153
|
});
|
|
154
154
|
Object.defineProperty(exports, "tooltip", {
|
|
@@ -253,6 +253,12 @@ Object.defineProperty(exports, "carouselDonut2", {
|
|
|
253
253
|
return _pie.carouselDonut2;
|
|
254
254
|
}
|
|
255
255
|
});
|
|
256
|
+
Object.defineProperty(exports, "pieCurrent", {
|
|
257
|
+
enumerable: true,
|
|
258
|
+
get: function get() {
|
|
259
|
+
return _pie.current;
|
|
260
|
+
}
|
|
261
|
+
});
|
|
256
262
|
Object.defineProperty(exports, "brush", {
|
|
257
263
|
enumerable: true,
|
|
258
264
|
get: function get() {
|
package/lib/interaction.js
CHANGED
package/lib/legend.js
CHANGED
|
@@ -5,7 +5,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.legendOfDoublePie = exports.legendOfPie = exports.legendOfRose = exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
11
|
|
|
10
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
13
|
|
|
@@ -647,9 +649,15 @@ var legendOfPie = function legendOfPie() {
|
|
|
647
649
|
};
|
|
648
650
|
|
|
649
651
|
exports.legendOfPie = legendOfPie;
|
|
650
|
-
var
|
|
652
|
+
var defaultLegendOfDoublePie = {
|
|
651
653
|
show: true,
|
|
652
|
-
|
|
654
|
+
key: "legend",
|
|
655
|
+
displayName: "图例",
|
|
656
|
+
iconSize: {
|
|
657
|
+
width: 10,
|
|
658
|
+
height: 10
|
|
659
|
+
},
|
|
660
|
+
iconGap: 5,
|
|
653
661
|
name: {
|
|
654
662
|
show: true,
|
|
655
663
|
font: defaultFont
|
|
@@ -690,94 +698,115 @@ var defaultLegendOfPieNoIcon = {
|
|
|
690
698
|
}
|
|
691
699
|
};
|
|
692
700
|
|
|
693
|
-
var
|
|
694
|
-
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] :
|
|
701
|
+
var legendOfDoublePie = function legendOfDoublePie() {
|
|
702
|
+
var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultLegendOfDoublePie,
|
|
695
703
|
_ref4$show = _ref4.show,
|
|
696
|
-
show = _ref4$show === void 0 ?
|
|
697
|
-
_ref4$
|
|
698
|
-
|
|
699
|
-
_ref4$
|
|
704
|
+
show = _ref4$show === void 0 ? defaultLegendOfDoublePie.show : _ref4$show,
|
|
705
|
+
_ref4$key = _ref4.key,
|
|
706
|
+
key = _ref4$key === void 0 ? defaultLegendOfDoublePie.key : _ref4$key,
|
|
707
|
+
_ref4$displayName = _ref4.displayName,
|
|
708
|
+
displayName = _ref4$displayName === void 0 ? defaultLegendOfDoublePie.displayName : _ref4$displayName,
|
|
709
|
+
_ref4$iconSize = _ref4.iconSize;
|
|
700
710
|
|
|
701
|
-
_ref4$
|
|
711
|
+
_ref4$iconSize = _ref4$iconSize === void 0 ? defaultLegendOfDoublePie.iconSize : _ref4$iconSize;
|
|
712
|
+
var _ref4$iconSize$width = _ref4$iconSize.width,
|
|
713
|
+
width = _ref4$iconSize$width === void 0 ? defaultLegendOfDoublePie.iconSize.width : _ref4$iconSize$width,
|
|
714
|
+
_ref4$iconSize$height = _ref4$iconSize.height,
|
|
715
|
+
height = _ref4$iconSize$height === void 0 ? defaultLegendOfDoublePie.iconSize.height : _ref4$iconSize$height,
|
|
716
|
+
_ref4$iconGap = _ref4.iconGap,
|
|
717
|
+
iconGap = _ref4$iconGap === void 0 ? defaultLegendOfDoublePie.iconGap : _ref4$iconGap,
|
|
718
|
+
_ref4$name = _ref4.name;
|
|
719
|
+
_ref4$name = _ref4$name === void 0 ? defaultLegendOfDoublePie.name : _ref4$name;
|
|
702
720
|
var _ref4$name$show = _ref4$name.show,
|
|
703
|
-
showName = _ref4$name$show === void 0 ?
|
|
721
|
+
showName = _ref4$name$show === void 0 ? defaultLegendOfDoublePie.name.show : _ref4$name$show,
|
|
704
722
|
_ref4$name$font = _ref4$name.font,
|
|
705
|
-
nameFont = _ref4$name$font === void 0 ?
|
|
723
|
+
nameFont = _ref4$name$font === void 0 ? defaultLegendOfDoublePie.name.font : _ref4$name$font,
|
|
706
724
|
_ref4$percent = _ref4.percent;
|
|
707
|
-
_ref4$percent = _ref4$percent === void 0 ?
|
|
725
|
+
_ref4$percent = _ref4$percent === void 0 ? defaultLegendOfDoublePie.percent : _ref4$percent;
|
|
708
726
|
var _ref4$percent$show = _ref4$percent.show,
|
|
709
|
-
showPercent = _ref4$percent$show === void 0 ?
|
|
727
|
+
showPercent = _ref4$percent$show === void 0 ? defaultLegendOfDoublePie.percent.show : _ref4$percent$show,
|
|
710
728
|
_ref4$percent$precisi = _ref4$percent.precision,
|
|
711
|
-
precision = _ref4$percent$precisi === void 0 ?
|
|
729
|
+
precision = _ref4$percent$precisi === void 0 ? defaultLegendOfDoublePie.percent.precision : _ref4$percent$precisi,
|
|
712
730
|
_ref4$percent$sameCol = _ref4$percent.sameColor,
|
|
713
|
-
percentSameColor = _ref4$percent$sameCol === void 0 ?
|
|
731
|
+
percentSameColor = _ref4$percent$sameCol === void 0 ? defaultLegendOfDoublePie.percent.sameColor : _ref4$percent$sameCol,
|
|
714
732
|
_ref4$percent$gap = _ref4$percent.gap,
|
|
715
|
-
percentGap = _ref4$percent$gap === void 0 ?
|
|
733
|
+
percentGap = _ref4$percent$gap === void 0 ? defaultLegendOfDoublePie.percent.gap : _ref4$percent$gap,
|
|
716
734
|
_ref4$percent$font = _ref4$percent.font,
|
|
717
|
-
percentFont = _ref4$percent$font === void 0 ?
|
|
735
|
+
percentFont = _ref4$percent$font === void 0 ? defaultLegendOfDoublePie.percent.font : _ref4$percent$font,
|
|
718
736
|
_ref4$value = _ref4.value;
|
|
719
|
-
_ref4$value = _ref4$value === void 0 ?
|
|
737
|
+
_ref4$value = _ref4$value === void 0 ? defaultLegendOfDoublePie.value : _ref4$value;
|
|
720
738
|
var _ref4$value$show = _ref4$value.show,
|
|
721
|
-
showValue = _ref4$value$show === void 0 ?
|
|
739
|
+
showValue = _ref4$value$show === void 0 ? defaultLegendOfDoublePie.value.show : _ref4$value$show,
|
|
722
740
|
_ref4$value$sameColor = _ref4$value.sameColor,
|
|
723
|
-
valueSameColor = _ref4$value$sameColor === void 0 ?
|
|
741
|
+
valueSameColor = _ref4$value$sameColor === void 0 ? defaultLegendOfDoublePie.value.sameColor : _ref4$value$sameColor,
|
|
724
742
|
_ref4$value$gap = _ref4$value.gap,
|
|
725
|
-
valueGap = _ref4$value$gap === void 0 ?
|
|
743
|
+
valueGap = _ref4$value$gap === void 0 ? defaultLegendOfDoublePie.value.gap : _ref4$value$gap,
|
|
726
744
|
_ref4$value$font = _ref4$value.font,
|
|
727
|
-
valueFont = _ref4$value$font === void 0 ?
|
|
745
|
+
valueFont = _ref4$value$font === void 0 ? defaultLegendOfDoublePie.value.font : _ref4$value$font,
|
|
728
746
|
_ref4$value$suffix = _ref4$value.suffix;
|
|
729
|
-
_ref4$value$suffix = _ref4$value$suffix === void 0 ?
|
|
747
|
+
_ref4$value$suffix = _ref4$value$suffix === void 0 ? defaultLegendOfDoublePie.value.suffix : _ref4$value$suffix;
|
|
730
748
|
var _ref4$value$suffix$sh = _ref4$value$suffix.show,
|
|
731
|
-
showSuffix = _ref4$value$suffix$sh === void 0 ?
|
|
749
|
+
showSuffix = _ref4$value$suffix$sh === void 0 ? defaultLegendOfDoublePie.value.suffix.show : _ref4$value$suffix$sh,
|
|
732
750
|
_ref4$value$suffix$te = _ref4$value$suffix.text,
|
|
733
|
-
text = _ref4$value$suffix$te === void 0 ?
|
|
751
|
+
text = _ref4$value$suffix$te === void 0 ? defaultLegendOfDoublePie.value.suffix.text : _ref4$value$suffix$te,
|
|
734
752
|
_ref4$value$suffix$fo = _ref4$value$suffix.fontSize,
|
|
735
|
-
fontSize = _ref4$value$suffix$fo === void 0 ?
|
|
753
|
+
fontSize = _ref4$value$suffix$fo === void 0 ? defaultLegendOfDoublePie.value.suffix.fontSize : _ref4$value$suffix$fo,
|
|
736
754
|
_ref4$value$suffix$tr = _ref4$value$suffix.translate;
|
|
737
|
-
_ref4$value$suffix$tr = _ref4$value$suffix$tr === void 0 ?
|
|
755
|
+
_ref4$value$suffix$tr = _ref4$value$suffix$tr === void 0 ? defaultLegendOfDoublePie.value.suffix.translate : _ref4$value$suffix$tr;
|
|
738
756
|
var _ref4$value$suffix$tr2 = _ref4$value$suffix$tr.x,
|
|
739
|
-
suffixTranslateX = _ref4$value$suffix$tr2 === void 0 ?
|
|
757
|
+
suffixTranslateX = _ref4$value$suffix$tr2 === void 0 ? defaultLegendOfDoublePie.value.suffix.translate.x : _ref4$value$suffix$tr2,
|
|
740
758
|
_ref4$value$suffix$tr3 = _ref4$value$suffix$tr.y,
|
|
741
|
-
suffixTranslateY = _ref4$value$suffix$tr3 === void 0 ?
|
|
759
|
+
suffixTranslateY = _ref4$value$suffix$tr3 === void 0 ? defaultLegendOfDoublePie.value.suffix.translate.y : _ref4$value$suffix$tr3,
|
|
742
760
|
_ref4$layout = _ref4.layout;
|
|
743
|
-
_ref4$layout = _ref4$layout === void 0 ?
|
|
761
|
+
_ref4$layout = _ref4$layout === void 0 ? defaultLegendOfDoublePie.layout : _ref4$layout;
|
|
744
762
|
var _ref4$layout$gridTemp = _ref4$layout.gridTemplateColumns,
|
|
745
|
-
gridTemplateColumns = _ref4$layout$gridTemp === void 0 ?
|
|
763
|
+
gridTemplateColumns = _ref4$layout$gridTemp === void 0 ? defaultLegendOfDoublePie.layout.gridTemplateColumns : _ref4$layout$gridTemp,
|
|
746
764
|
_ref4$layout$gridGap = _ref4$layout.gridGap;
|
|
747
|
-
_ref4$layout$gridGap = _ref4$layout$gridGap === void 0 ?
|
|
765
|
+
_ref4$layout$gridGap = _ref4$layout$gridGap === void 0 ? defaultLegendOfDoublePie.layout.gridGap : _ref4$layout$gridGap;
|
|
748
766
|
var _ref4$layout$gridGap$ = _ref4$layout$gridGap.gridRowGap,
|
|
749
|
-
gridRowGap = _ref4$layout$gridGap$ === void 0 ?
|
|
767
|
+
gridRowGap = _ref4$layout$gridGap$ === void 0 ? defaultLegendOfDoublePie.layout.gridGap.gridRowGap : _ref4$layout$gridGap$,
|
|
750
768
|
_ref4$layout$gridGap$2 = _ref4$layout$gridGap.gridColumnGap,
|
|
751
|
-
gridColumnGap = _ref4$layout$gridGap$2 === void 0 ?
|
|
769
|
+
gridColumnGap = _ref4$layout$gridGap$2 === void 0 ? defaultLegendOfDoublePie.layout.gridGap.gridColumnGap : _ref4$layout$gridGap$2,
|
|
752
770
|
_ref4$layout$alignmen = _ref4$layout.alignment,
|
|
753
|
-
alignment = _ref4$layout$alignmen === void 0 ?
|
|
771
|
+
alignment = _ref4$layout$alignmen === void 0 ? defaultLegendOfDoublePie.layout.alignment : _ref4$layout$alignmen,
|
|
754
772
|
_ref4$layout$translat = _ref4$layout.translate;
|
|
755
|
-
_ref4$layout$translat = _ref4$layout$translat === void 0 ?
|
|
773
|
+
_ref4$layout$translat = _ref4$layout$translat === void 0 ? defaultLegendOfDoublePie.layout.translate : _ref4$layout$translat;
|
|
756
774
|
var _ref4$layout$translat2 = _ref4$layout$translat.x,
|
|
757
|
-
x = _ref4$layout$translat2 === void 0 ?
|
|
775
|
+
x = _ref4$layout$translat2 === void 0 ? defaultLegendOfDoublePie.layout.translate.x : _ref4$layout$translat2,
|
|
758
776
|
_ref4$layout$translat3 = _ref4$layout$translat.y,
|
|
759
|
-
y = _ref4$layout$translat3 === void 0 ?
|
|
777
|
+
y = _ref4$layout$translat3 === void 0 ? defaultLegendOfDoublePie.layout.translate.y : _ref4$layout$translat3,
|
|
778
|
+
_ref4$layout$extraInp = _ref4$layout.extraInput,
|
|
779
|
+
extraInput = _ref4$layout$extraInp === void 0 ? [] : _ref4$layout$extraInp;
|
|
760
780
|
return {
|
|
761
|
-
name:
|
|
762
|
-
displayName:
|
|
763
|
-
value: [showConfig(show), {
|
|
764
|
-
name: '
|
|
765
|
-
displayName: '
|
|
766
|
-
value:
|
|
767
|
-
|
|
781
|
+
name: key,
|
|
782
|
+
displayName: displayName,
|
|
783
|
+
value: [showConfig(show), _objectSpread(_objectSpread({}, showRule()), {}, {
|
|
784
|
+
name: 'iconSize',
|
|
785
|
+
displayName: '图标尺寸',
|
|
786
|
+
value: [{
|
|
787
|
+
name: 'width',
|
|
788
|
+
displayName: '宽度',
|
|
789
|
+
value: width,
|
|
790
|
+
config: {
|
|
791
|
+
span: 12
|
|
792
|
+
}
|
|
793
|
+
}, {
|
|
794
|
+
name: 'height',
|
|
795
|
+
displayName: '高度',
|
|
796
|
+
value: height,
|
|
797
|
+
config: {
|
|
798
|
+
span: 12
|
|
799
|
+
}
|
|
800
|
+
}],
|
|
801
|
+
type: 'group'
|
|
802
|
+
}), _objectSpread(_objectSpread({}, showRule()), {}, {
|
|
803
|
+
name: 'iconGap',
|
|
804
|
+
displayName: '间距',
|
|
805
|
+
value: iconGap,
|
|
768
806
|
config: {
|
|
769
|
-
|
|
770
|
-
name: '数据返回顺序',
|
|
771
|
-
value: ''
|
|
772
|
-
}, {
|
|
773
|
-
name: '从大到小',
|
|
774
|
-
value: 'desc'
|
|
775
|
-
}, {
|
|
776
|
-
name: '从小到大',
|
|
777
|
-
value: 'asc'
|
|
778
|
-
}]
|
|
807
|
+
suffix: 'px'
|
|
779
808
|
}
|
|
780
|
-
}, {
|
|
809
|
+
}), {
|
|
781
810
|
rule: [['show', '$eq', true]],
|
|
782
811
|
name: 'name',
|
|
783
812
|
displayName: '类目',
|
|
@@ -911,15 +940,9 @@ var legendOfPieNoIcon = function legendOfPieNoIcon() {
|
|
|
911
940
|
}
|
|
912
941
|
}],
|
|
913
942
|
type: 'group'
|
|
914
|
-
}, {
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
displayName: '位置',
|
|
918
|
-
value: alignment,
|
|
919
|
-
config: {
|
|
920
|
-
options: ['left top', 'center top', 'right top', 'center left', '', 'center right', 'left bottom', 'center bottom', 'right bottom']
|
|
921
|
-
}
|
|
922
|
-
}, translateConfig(x, y)]
|
|
943
|
+
}].concat((0, _toConsumableArray2["default"])(extraInput)).filter(function (item) {
|
|
944
|
+
return !!item;
|
|
945
|
+
})
|
|
923
946
|
}],
|
|
924
947
|
config: {
|
|
925
948
|
defaultOpen: true
|
|
@@ -927,4 +950,4 @@ var legendOfPieNoIcon = function legendOfPieNoIcon() {
|
|
|
927
950
|
};
|
|
928
951
|
};
|
|
929
952
|
|
|
930
|
-
exports.
|
|
953
|
+
exports.legendOfDoublePie = legendOfDoublePie;
|
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.nestRosePie = exports.carouselDonut = exports.donut = exports.rosePieDecorate = exports.rosePie = void 0;
|
|
8
|
+
exports["default"] = exports.carouselDonut2 = exports.nestRosePie = exports.carouselDonut = exports.donut = exports.rosePieDecorate = exports.rosePie = exports.current = void 0;
|
|
9
9
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
|
|
@@ -524,6 +524,8 @@ var current = function current() {
|
|
|
524
524
|
showName = _ref9$current$name$sh === void 0 ? defaultCurrent.current.name.show : _ref9$current$name$sh,
|
|
525
525
|
_ref9$current$name$fo = _ref9$current$name.font,
|
|
526
526
|
nameFont = _ref9$current$name$fo === void 0 ? defaultCurrent.current.name.font : _ref9$current$name$fo,
|
|
527
|
+
nameTranslate = _ref9$current$name.translate,
|
|
528
|
+
textBreak = _ref9$current$name.textBreak,
|
|
527
529
|
_ref9$current$percent = _ref9$current.percent;
|
|
528
530
|
_ref9$current$percent = _ref9$current$percent === void 0 ? defaultCurrent.current.percent : _ref9$current$percent;
|
|
529
531
|
var _ref9$current$percent2 = _ref9$current$percent.show,
|
|
@@ -580,7 +582,12 @@ var current = function current() {
|
|
|
580
582
|
displayName: '文本样式',
|
|
581
583
|
value: nameFont,
|
|
582
584
|
type: 'textStyle'
|
|
583
|
-
}
|
|
585
|
+
}, nameTranslate != undefined && _objectSpread(_objectSpread({}, (0, _.showRule)()), (0, _.translate)(nameTranslate.x, nameTranslate.y)), textBreak != undefined && _objectSpread(_objectSpread({}, (0, _.showRule)()), (0, _.sc)("textBreak", "首行字数", "number", textBreak, {
|
|
586
|
+
min: 0,
|
|
587
|
+
suffix: "个"
|
|
588
|
+
}))].filter(function (item) {
|
|
589
|
+
return !!item;
|
|
590
|
+
})
|
|
584
591
|
}, {
|
|
585
592
|
rule: [['show', '$eq', true]],
|
|
586
593
|
name: 'percent',
|
|
@@ -650,6 +657,7 @@ var current = function current() {
|
|
|
650
657
|
};
|
|
651
658
|
};
|
|
652
659
|
|
|
660
|
+
exports.current = current;
|
|
653
661
|
var defaultBaseOuter = {
|
|
654
662
|
chart: {
|
|
655
663
|
innerRadius: 0,
|
package/lib/series.js
CHANGED
|
@@ -259,7 +259,12 @@ var defaultIcon = {
|
|
|
259
259
|
radius: 6
|
|
260
260
|
},
|
|
261
261
|
color: '#1283E3',
|
|
262
|
-
radius: 4
|
|
262
|
+
radius: 4,
|
|
263
|
+
image: 'components/static-image/superChart/fang.png',
|
|
264
|
+
size: {
|
|
265
|
+
width: 10,
|
|
266
|
+
height: 10
|
|
267
|
+
}
|
|
263
268
|
};
|
|
264
269
|
|
|
265
270
|
var commonLine = function commonLine() {
|
|
@@ -399,7 +404,15 @@ var icon = function icon() {
|
|
|
399
404
|
_ref4$color = _ref4.color,
|
|
400
405
|
color = _ref4$color === void 0 ? defaultIcon.color : _ref4$color,
|
|
401
406
|
_ref4$radius = _ref4.radius,
|
|
402
|
-
radius = _ref4$radius === void 0 ? defaultIcon.radius : _ref4$radius
|
|
407
|
+
radius = _ref4$radius === void 0 ? defaultIcon.radius : _ref4$radius,
|
|
408
|
+
_ref4$image = _ref4.image,
|
|
409
|
+
image = _ref4$image === void 0 ? defaultIcon.image : _ref4$image,
|
|
410
|
+
_ref4$size = _ref4.size;
|
|
411
|
+
_ref4$size = _ref4$size === void 0 ? defaultIcon.size : _ref4$size;
|
|
412
|
+
var _ref4$size$width = _ref4$size.width,
|
|
413
|
+
imageWidth = _ref4$size$width === void 0 ? defaultIcon.size.width : _ref4$size$width,
|
|
414
|
+
_ref4$size$height = _ref4$size.height,
|
|
415
|
+
imageHeight = _ref4$size$height === void 0 ? defaultIcon.size.height : _ref4$size$height;
|
|
403
416
|
return {
|
|
404
417
|
name: 'icon',
|
|
405
418
|
displayName: '数据标记',
|
|
@@ -421,8 +434,39 @@ var icon = function icon() {
|
|
|
421
434
|
}, {
|
|
422
435
|
name: '双圆',
|
|
423
436
|
value: 'double'
|
|
437
|
+
}, {
|
|
438
|
+
name: '自定义',
|
|
439
|
+
value: 'custom'
|
|
424
440
|
}]
|
|
425
441
|
}
|
|
442
|
+
}, {
|
|
443
|
+
rule: [['show', '$eq', true], ['mode', '$eq', 'custom']],
|
|
444
|
+
name: 'image',
|
|
445
|
+
displayName: '图片',
|
|
446
|
+
value: image,
|
|
447
|
+
type: 'uploadImage'
|
|
448
|
+
}, {
|
|
449
|
+
rule: [['show', '$eq', true], ['mode', '$eq', 'custom']],
|
|
450
|
+
name: 'size',
|
|
451
|
+
displayName: '尺寸',
|
|
452
|
+
value: [{
|
|
453
|
+
name: 'width',
|
|
454
|
+
displayName: '宽度',
|
|
455
|
+
value: imageWidth,
|
|
456
|
+
config: {
|
|
457
|
+
span: 12,
|
|
458
|
+
suffix: 'W'
|
|
459
|
+
}
|
|
460
|
+
}, {
|
|
461
|
+
name: 'height',
|
|
462
|
+
displayName: '高度',
|
|
463
|
+
value: imageHeight,
|
|
464
|
+
config: {
|
|
465
|
+
span: 12,
|
|
466
|
+
suffix: 'H'
|
|
467
|
+
}
|
|
468
|
+
}],
|
|
469
|
+
type: 'group'
|
|
426
470
|
}, {
|
|
427
471
|
rule: [['show', '$eq', true], ['mode', '$eq', 'double']],
|
|
428
472
|
name: 'inner',
|
package/lib/tooltip.js
CHANGED
|
@@ -43,8 +43,9 @@ var defaultTooltip = {
|
|
|
43
43
|
y: 0
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
lineHeight: 18,
|
|
47
46
|
data: {
|
|
47
|
+
lineHeight: 18,
|
|
48
|
+
iconSize: 10,
|
|
48
49
|
name: {
|
|
49
50
|
fontFamily: 'Mircosoft Yahei',
|
|
50
51
|
fontSize: 12,
|
|
@@ -60,6 +61,20 @@ var defaultTooltip = {
|
|
|
60
61
|
bold: false,
|
|
61
62
|
italic: false,
|
|
62
63
|
letterSpacing: 0
|
|
64
|
+
},
|
|
65
|
+
suffix: {
|
|
66
|
+
font: {
|
|
67
|
+
fontFamily: 'Mircosoft Yahei',
|
|
68
|
+
fontSize: 12,
|
|
69
|
+
color: '#D4EFFC',
|
|
70
|
+
bold: false,
|
|
71
|
+
italic: false,
|
|
72
|
+
letterSpacing: 0
|
|
73
|
+
},
|
|
74
|
+
translate: {
|
|
75
|
+
x: 0,
|
|
76
|
+
y: 0
|
|
77
|
+
}
|
|
63
78
|
}
|
|
64
79
|
}
|
|
65
80
|
}
|
|
@@ -123,11 +138,13 @@ var _default = function _default() {
|
|
|
123
138
|
_ref$tip$data$xAxis$t = _ref$tip$data$xAxis$t === void 0 ? defaultTooltip.tip.data.xAxis.translate : _ref$tip$data$xAxis$t;
|
|
124
139
|
var x = _ref$tip$data$xAxis$t.x,
|
|
125
140
|
y = _ref$tip$data$xAxis$t.y,
|
|
126
|
-
_ref$tip$data$lineHei = _ref$tip$data.lineHeight,
|
|
127
|
-
lineHeight = _ref$tip$data$lineHei === void 0 ? defaultTooltip.tip.data.lineHeight : _ref$tip$data$lineHei,
|
|
128
141
|
_ref$tip$data$data = _ref$tip$data.data;
|
|
129
142
|
_ref$tip$data$data = _ref$tip$data$data === void 0 ? defaultTooltip.tip.data.data : _ref$tip$data$data;
|
|
130
|
-
var _ref$tip$data$data$
|
|
143
|
+
var _ref$tip$data$data$li = _ref$tip$data$data.lineHeight,
|
|
144
|
+
lineHeight = _ref$tip$data$data$li === void 0 ? defaultTooltip.tip.data.lineHeight : _ref$tip$data$data$li,
|
|
145
|
+
_ref$tip$data$data$ic = _ref$tip$data$data.iconSize,
|
|
146
|
+
iconSize = _ref$tip$data$data$ic === void 0 ? defaultTooltip.tip.data.iconSize : _ref$tip$data$data$ic,
|
|
147
|
+
_ref$tip$data$data$na = _ref$tip$data$data.name;
|
|
131
148
|
_ref$tip$data$data$na = _ref$tip$data$data$na === void 0 ? defaultTooltip.tip.data.data.name : _ref$tip$data$data$na;
|
|
132
149
|
var nameFontFamily = _ref$tip$data$data$na.fontFamily,
|
|
133
150
|
nameFontSize = _ref$tip$data$data$na.fontSize,
|
|
@@ -143,6 +160,16 @@ var _default = function _default() {
|
|
|
143
160
|
valueFontBold = _ref$tip$data$data$va.bold,
|
|
144
161
|
valueFontItalic = _ref$tip$data$data$va.italic,
|
|
145
162
|
valueFontLetterSpacing = _ref$tip$data$data$va.letterSpacing,
|
|
163
|
+
_ref$tip$data$data$su = _ref$tip$data$data.suffix;
|
|
164
|
+
_ref$tip$data$data$su = _ref$tip$data$data$su === void 0 ? defaultTooltip.tip.data.data.suffix : _ref$tip$data$data$su;
|
|
165
|
+
var _ref$tip$data$data$su2 = _ref$tip$data$data$su.font;
|
|
166
|
+
_ref$tip$data$data$su2 = _ref$tip$data$data$su2 === void 0 ? defaultTooltip.tip.data.data.suffix.font : _ref$tip$data$data$su2;
|
|
167
|
+
var suffixFontFamily = _ref$tip$data$data$su2.fontFamily,
|
|
168
|
+
suffixFontSize = _ref$tip$data$data$su2.fontSize,
|
|
169
|
+
suffixColor = _ref$tip$data$data$su2.color,
|
|
170
|
+
suffixBold = _ref$tip$data$data$su2.bold,
|
|
171
|
+
suffixItalic = _ref$tip$data$data$su2.italic,
|
|
172
|
+
suffixLetterSpacing = _ref$tip$data$data$su2.letterSpacing,
|
|
146
173
|
_ref$indicator = _ref.indicator;
|
|
147
174
|
_ref$indicator = _ref$indicator === void 0 ? defaultTooltip.indicator : _ref$indicator;
|
|
148
175
|
var _ref$indicator$width = _ref$indicator.width,
|
|
@@ -210,7 +237,7 @@ var _default = function _default() {
|
|
|
210
237
|
displayName: '框内数据',
|
|
211
238
|
value: [{
|
|
212
239
|
name: 'xAxis',
|
|
213
|
-
displayName: '
|
|
240
|
+
displayName: '类目标签',
|
|
214
241
|
value: [{
|
|
215
242
|
name: 'font',
|
|
216
243
|
displayName: '文本样式',
|
|
@@ -246,14 +273,19 @@ var _default = function _default() {
|
|
|
246
273
|
}
|
|
247
274
|
}, (0, _.translate)(x, y)]
|
|
248
275
|
}, {
|
|
249
|
-
displayName: '
|
|
250
|
-
type: 'number',
|
|
251
|
-
value: lineHeight,
|
|
252
|
-
name: 'lineHeight'
|
|
253
|
-
}, {
|
|
254
|
-
displayName: '数据样式',
|
|
276
|
+
displayName: '数据',
|
|
255
277
|
name: 'data',
|
|
256
278
|
value: [{
|
|
279
|
+
displayName: '行间距',
|
|
280
|
+
type: 'number',
|
|
281
|
+
value: lineHeight,
|
|
282
|
+
name: 'lineHeight'
|
|
283
|
+
}, {
|
|
284
|
+
displayName: '图标尺寸',
|
|
285
|
+
type: 'number',
|
|
286
|
+
value: iconSize,
|
|
287
|
+
name: 'iconSize'
|
|
288
|
+
}, {
|
|
257
289
|
name: 'name',
|
|
258
290
|
displayName: '系列名称',
|
|
259
291
|
value: {
|
|
@@ -277,6 +309,87 @@ var _default = function _default() {
|
|
|
277
309
|
letterSpacing: valueFontLetterSpacing
|
|
278
310
|
},
|
|
279
311
|
type: 'textStyle'
|
|
312
|
+
}, {
|
|
313
|
+
name: 'suffix',
|
|
314
|
+
displayName: '后缀',
|
|
315
|
+
value: [{
|
|
316
|
+
name: 'show',
|
|
317
|
+
displayName: '显示',
|
|
318
|
+
value: false,
|
|
319
|
+
type: 'boolean'
|
|
320
|
+
}, {
|
|
321
|
+
name: 'content',
|
|
322
|
+
displayName: '内容',
|
|
323
|
+
value: [{
|
|
324
|
+
name: "suffixText1",
|
|
325
|
+
displayName: "后缀",
|
|
326
|
+
type: "object",
|
|
327
|
+
value: [{
|
|
328
|
+
name: "suffix",
|
|
329
|
+
displayName: "后缀",
|
|
330
|
+
type: "group",
|
|
331
|
+
value: [{
|
|
332
|
+
name: "name",
|
|
333
|
+
displayName: "系列名",
|
|
334
|
+
value: "系列一",
|
|
335
|
+
type: "input",
|
|
336
|
+
config: {
|
|
337
|
+
span: 12
|
|
338
|
+
}
|
|
339
|
+
}, {
|
|
340
|
+
name: "suffix",
|
|
341
|
+
displayName: "后缀",
|
|
342
|
+
value: "%",
|
|
343
|
+
type: "input",
|
|
344
|
+
config: {
|
|
345
|
+
span: 12
|
|
346
|
+
}
|
|
347
|
+
}]
|
|
348
|
+
}]
|
|
349
|
+
}],
|
|
350
|
+
config: {
|
|
351
|
+
template: [{
|
|
352
|
+
name: "suffixText",
|
|
353
|
+
displayName: "后缀",
|
|
354
|
+
type: "object",
|
|
355
|
+
value: [{
|
|
356
|
+
name: "suffix",
|
|
357
|
+
displayName: "后缀",
|
|
358
|
+
type: "group",
|
|
359
|
+
value: [{
|
|
360
|
+
name: "name",
|
|
361
|
+
displayName: "系列名",
|
|
362
|
+
value: "",
|
|
363
|
+
type: "input",
|
|
364
|
+
config: {
|
|
365
|
+
span: 12
|
|
366
|
+
}
|
|
367
|
+
}, {
|
|
368
|
+
name: "suffix",
|
|
369
|
+
displayName: "后缀",
|
|
370
|
+
value: "",
|
|
371
|
+
type: "input",
|
|
372
|
+
config: {
|
|
373
|
+
span: 12
|
|
374
|
+
}
|
|
375
|
+
}]
|
|
376
|
+
}]
|
|
377
|
+
}]
|
|
378
|
+
},
|
|
379
|
+
type: 'array'
|
|
380
|
+
}, {
|
|
381
|
+
name: 'font',
|
|
382
|
+
displayName: '文本样式',
|
|
383
|
+
value: {
|
|
384
|
+
fontFamily: suffixFontFamily,
|
|
385
|
+
fontSize: suffixFontSize,
|
|
386
|
+
color: suffixColor,
|
|
387
|
+
bold: suffixBold,
|
|
388
|
+
italic: suffixItalic,
|
|
389
|
+
letterSpacing: suffixLetterSpacing
|
|
390
|
+
},
|
|
391
|
+
type: 'textStyle'
|
|
392
|
+
}, (0, _.translate)(x, y)]
|
|
280
393
|
}]
|
|
281
394
|
}]
|
|
282
395
|
}]
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@easyv/config",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"make": "babel src -d lib"
|
|
8
|
-
},
|
|
9
|
-
"keywords": [],
|
|
10
|
-
"author": "",
|
|
11
|
-
"license": "ISC",
|
|
12
|
-
"devDependencies": {
|
|
13
|
-
"@babel/cli": "^7.6.0",
|
|
14
|
-
"@babel/core": "^7.11.5",
|
|
15
|
-
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
|
16
|
-
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
|
17
|
-
"@babel/plugin-transform-runtime": "^7.11.5",
|
|
18
|
-
"@babel/preset-env": "^7.11.5",
|
|
19
|
-
"@babel/preset-react": "^7.10.4",
|
|
20
|
-
"babel-plugin-transform-import-styles": "0.0.11",
|
|
21
|
-
"babel-preset-env": "^1.7.0"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@easyv/config",
|
|
3
|
+
"version": "1.0.47",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"make": "babel src -d lib"
|
|
8
|
+
},
|
|
9
|
+
"keywords": [],
|
|
10
|
+
"author": "",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@babel/cli": "^7.6.0",
|
|
14
|
+
"@babel/core": "^7.11.5",
|
|
15
|
+
"@babel/plugin-proposal-class-properties": "^7.10.4",
|
|
16
|
+
"@babel/plugin-proposal-export-default-from": "^7.10.4",
|
|
17
|
+
"@babel/plugin-transform-runtime": "^7.11.5",
|
|
18
|
+
"@babel/preset-env": "^7.11.5",
|
|
19
|
+
"@babel/preset-react": "^7.10.4",
|
|
20
|
+
"babel-plugin-transform-import-styles": "0.0.11",
|
|
21
|
+
"babel-preset-env": "^1.7.0"
|
|
22
|
+
}
|
|
23
|
+
}
|