@easyv/charts 1.5.8 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.5.8",
3
+ "version": "1.5.9",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -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
  )}