@easyv/charts 1.10.31 → 1.10.33
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/lib/components/PieChart.js +2 -2
- package/lib/components/Tooltip.js +11 -8
- package/package.json +2 -2
- package/src/components/PieChart.js +1629 -1629
- package/src/components/Tooltip.js +16 -7
|
@@ -27,8 +27,8 @@ var _excluded = ["startAngle", "endAngle", "antiClockwise"],
|
|
|
27
27
|
_excluded2 = ["padAngle", "innerRadius", "outerRadius", "cornerRadius", "startAngle", "endAngle"],
|
|
28
28
|
_excluded3 = ["formatter"],
|
|
29
29
|
_excluded4 = ["startAngle", "endAngle"];
|
|
30
|
-
/**
|
|
31
|
-
* 饼环图
|
|
30
|
+
/**
|
|
31
|
+
* 饼环图
|
|
32
32
|
*/
|
|
33
33
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
34
34
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -66,21 +66,24 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
66
66
|
x: translateTip.x + position + marginLeft
|
|
67
67
|
});
|
|
68
68
|
if (!isVertical && translate3d.x + tooltipSize.width > width) {
|
|
69
|
-
|
|
70
|
-
translate3d.x =
|
|
69
|
+
translate3d.x = position + marginLeft - tooltipSize.width - translateTip.x;
|
|
70
|
+
translate3d.x = translate3d.x >= 0 ? translate3d.x : 0;
|
|
71
|
+
translate3d.x = translate3d.x + tooltipSize.width > width ? width - tooltipSize.width : translate3d.x;
|
|
72
|
+
translate3d.x = translate3d.x >= 0 ? translate3d.x : 0;
|
|
71
73
|
}
|
|
72
74
|
if (isVertical && translate3d.y + tooltipSize.height > height) {
|
|
73
|
-
|
|
74
|
-
translate3d.y =
|
|
75
|
+
translate3d.y = position + marginTop - tooltipSize.height - translateTip.y;
|
|
76
|
+
translate3d.y = translate3d.y >= 0 ? translate3d.y : 0;
|
|
77
|
+
translate3d.y = translate3d.y + tooltipSize.height > height ? height - tooltipSize.height : translate3d.y;
|
|
78
|
+
translate3d.y = translate3d.y >= 0 ? translate3d.y : 0;
|
|
75
79
|
}
|
|
76
80
|
return (0, _utils.getTranslate3d)(translate3d);
|
|
77
|
-
}, [width, height, marginLeft, marginTop, position, tooltipSize, translateTip]);
|
|
81
|
+
}, [isVertical, width, height, marginLeft, marginTop, position, tooltipSize, translateTip]);
|
|
78
82
|
(0, _react.useEffect)(function () {
|
|
79
83
|
if (tooltipRef.current && (manual || auto)) {
|
|
80
|
-
var rect = tooltipRef.current.getBoundingClientRect();
|
|
81
84
|
setTooltipSize({
|
|
82
|
-
width:
|
|
83
|
-
height:
|
|
85
|
+
width: tooltipRef.current.offsetWidth,
|
|
86
|
+
height: tooltipRef.current.offsetHeight
|
|
84
87
|
});
|
|
85
88
|
}
|
|
86
89
|
}, [manual, auto, formatter, data, series, x]);
|