@easyv/charts 1.5.7 → 1.5.9
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.
|
@@ -834,6 +834,11 @@ var Current = function Current(_ref9) {
|
|
|
834
834
|
showName = _ref9$config$name.show,
|
|
835
835
|
nameColor = _ref9$config$name.sameColor,
|
|
836
836
|
nameFont = _ref9$config$name.font,
|
|
837
|
+
_ref9$config$name$tra = _ref9$config$name.translate,
|
|
838
|
+
translate = _ref9$config$name$tra === void 0 ? {
|
|
839
|
+
x: 0,
|
|
840
|
+
y: 0
|
|
841
|
+
} : _ref9$config$name$tra,
|
|
837
842
|
maxWidth = _ref9$config$name.maxWidth,
|
|
838
843
|
textOverflow = _ref9$config$name.textOverflow,
|
|
839
844
|
speed = _ref9$config$name.speed,
|
|
@@ -917,7 +922,8 @@ var Current = function Current(_ref9) {
|
|
|
917
922
|
justifyContent: "center"
|
|
918
923
|
}, (0, _utils.getFontStyle)(nameFont)), {}, {
|
|
919
924
|
margin: gap / 2 + "px 0",
|
|
920
|
-
color: nameColor ? seriesColor : nameFont.color
|
|
925
|
+
color: nameColor ? seriesColor : nameFont.color,
|
|
926
|
+
transform: "translate(".concat(translate.x, "px,").concat(translate.y, "px)")
|
|
921
927
|
})
|
|
922
928
|
}), //真实值
|
|
923
929
|
showValue && /*#__PURE__*/_react["default"].createElement("span", {
|
package/lib/utils/index.js
CHANGED
|
@@ -35,12 +35,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
35
35
|
var defaultSize = 10;
|
|
36
36
|
var defaultBackground = '#000000';
|
|
37
37
|
var defaultIcon = {
|
|
38
|
-
|
|
38
|
+
minWidth: defaultSize,
|
|
39
39
|
height: defaultSize,
|
|
40
40
|
background: defaultBackground
|
|
41
41
|
};
|
|
42
42
|
var defaultLineIcon = {
|
|
43
|
-
|
|
43
|
+
minWidth: defaultSize,
|
|
44
44
|
height: 2,
|
|
45
45
|
background: defaultBackground
|
|
46
46
|
};
|
package/package.json
CHANGED
|
@@ -882,6 +882,7 @@ const Current = ({
|
|
|
882
882
|
show: showName,
|
|
883
883
|
sameColor: nameColor,
|
|
884
884
|
font: nameFont,
|
|
885
|
+
translate = { x:0,y:0 },
|
|
885
886
|
maxWidth,
|
|
886
887
|
textOverflow,
|
|
887
888
|
speed,
|
|
@@ -968,6 +969,7 @@ const Current = ({
|
|
|
968
969
|
...getFontStyle(nameFont),
|
|
969
970
|
margin: gap / 2 + "px 0",
|
|
970
971
|
color: nameColor ? seriesColor : nameFont.color,
|
|
972
|
+
transform:`translate(${translate.x}px,${translate.y}px)`
|
|
971
973
|
}}
|
|
972
974
|
></TextOverflow>
|
|
973
975
|
)}
|
package/src/utils/index.js
CHANGED
|
@@ -13,12 +13,12 @@ import { toPath } from 'svg-points';
|
|
|
13
13
|
const defaultSize = 10;
|
|
14
14
|
const defaultBackground = '#000000';
|
|
15
15
|
const defaultIcon = {
|
|
16
|
-
|
|
16
|
+
minWidth: defaultSize,
|
|
17
17
|
height: defaultSize,
|
|
18
18
|
background: defaultBackground,
|
|
19
19
|
};
|
|
20
20
|
const defaultLineIcon = {
|
|
21
|
-
|
|
21
|
+
minWidth: defaultSize,
|
|
22
22
|
height: 2,
|
|
23
23
|
background: defaultBackground,
|
|
24
24
|
};
|