@easyv/charts 1.5.8 → 1.5.10
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.
|
@@ -484,6 +484,9 @@ var Component = /*#__PURE__*/(0, _react.memo)(function (_ref5) {
|
|
|
484
484
|
}, [series, arcs, radius]);
|
|
485
485
|
|
|
486
486
|
var onClick = (0, _react.useCallback)(function (e) {
|
|
487
|
+
var _data = arcs[+e.currentTarget.dataset.index].data;
|
|
488
|
+
triggerOnRelative('onClick', _data);
|
|
489
|
+
onEmit('onClick', _data);
|
|
487
490
|
onEvent({
|
|
488
491
|
currentIndex: +e.currentTarget.dataset.index,
|
|
489
492
|
type: "onClick"
|
|
@@ -834,6 +837,11 @@ var Current = function Current(_ref9) {
|
|
|
834
837
|
showName = _ref9$config$name.show,
|
|
835
838
|
nameColor = _ref9$config$name.sameColor,
|
|
836
839
|
nameFont = _ref9$config$name.font,
|
|
840
|
+
_ref9$config$name$tra = _ref9$config$name.translate,
|
|
841
|
+
translate = _ref9$config$name$tra === void 0 ? {
|
|
842
|
+
x: 0,
|
|
843
|
+
y: 0
|
|
844
|
+
} : _ref9$config$name$tra,
|
|
837
845
|
maxWidth = _ref9$config$name.maxWidth,
|
|
838
846
|
textOverflow = _ref9$config$name.textOverflow,
|
|
839
847
|
speed = _ref9$config$name.speed,
|
|
@@ -917,7 +925,8 @@ var Current = function Current(_ref9) {
|
|
|
917
925
|
justifyContent: "center"
|
|
918
926
|
}, (0, _utils.getFontStyle)(nameFont)), {}, {
|
|
919
927
|
margin: gap / 2 + "px 0",
|
|
920
|
-
color: nameColor ? seriesColor : nameFont.color
|
|
928
|
+
color: nameColor ? seriesColor : nameFont.color,
|
|
929
|
+
transform: "translate(".concat(translate.x, "px,").concat(translate.y, "px)")
|
|
921
930
|
})
|
|
922
931
|
}), //真实值
|
|
923
932
|
showValue && /*#__PURE__*/_react["default"].createElement("span", {
|
package/package.json
CHANGED
|
@@ -401,6 +401,9 @@ const Component = memo(
|
|
|
401
401
|
|
|
402
402
|
const onClick = useCallback(
|
|
403
403
|
(e) => {
|
|
404
|
+
const _data = arcs[+e.currentTarget.dataset.index].data;
|
|
405
|
+
triggerOnRelative('onClick',_data);
|
|
406
|
+
onEmit('onClick', _data);
|
|
404
407
|
onEvent({
|
|
405
408
|
currentIndex: +e.currentTarget.dataset.index,
|
|
406
409
|
type: "onClick",
|
|
@@ -882,6 +885,7 @@ const Current = ({
|
|
|
882
885
|
show: showName,
|
|
883
886
|
sameColor: nameColor,
|
|
884
887
|
font: nameFont,
|
|
888
|
+
translate = { x:0,y:0 },
|
|
885
889
|
maxWidth,
|
|
886
890
|
textOverflow,
|
|
887
891
|
speed,
|
|
@@ -968,6 +972,7 @@ const Current = ({
|
|
|
968
972
|
...getFontStyle(nameFont),
|
|
969
973
|
margin: gap / 2 + "px 0",
|
|
970
974
|
color: nameColor ? seriesColor : nameFont.color,
|
|
975
|
+
transform:`translate(${translate.x}px,${translate.y}px)`
|
|
971
976
|
}}
|
|
972
977
|
></TextOverflow>
|
|
973
978
|
)}
|