@easyv/charts 1.9.21 → 1.9.22

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.
@@ -264,7 +264,7 @@ var Label = function Label(_ref5) {
264
264
  // y={y}
265
265
  ,
266
266
  style: {
267
- overflow: "hidden"
267
+ overflow: "visible"
268
268
  }
269
269
  }, /*#__PURE__*/_react["default"].createElement("div", {
270
270
  className: className,
@@ -347,7 +347,6 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(
347
347
  cBarX = controlInfo.cBarX,
348
348
  cWidth = controlInfo.cWidth,
349
349
  cBarWidth = controlInfo.cBarWidth;
350
- var clipPathIdRef = (0, _react.useRef)("axis-clip-".concat(orientation, "-").concat(axisType, "-").concat(Math.random().toString(36).substr(2, 9)));
351
350
  var x = orientation == "right" ? width : 0;
352
351
  var y = orientation == "bottom" ? height - cHeight : 0;
353
352
  var LabelWidth = 1;
@@ -550,20 +549,10 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(
550
549
  }), tickLine && drawAxisTickLine()))), /*#__PURE__*/_react["default"].createElement("svg", {
551
550
  width: width,
552
551
  style: {
553
- overflow: "hidden"
552
+ overflow: axisType === "x" && isC ? "hidden" : "visible"
554
553
  }
555
- }, axisType === "x" && isC || isIOS && axisType === "x" ? /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("clipPath", {
556
- id: clipPathIdRef.current,
557
- clipPathUnits: "userSpaceOnUse"
558
- }, /*#__PURE__*/_react["default"].createElement("rect", {
559
- x: "0",
560
- y: "0",
561
- width: xLineRange,
562
- height: height + 200,
563
- fill: "transparent"
564
- }))) : null, /*#__PURE__*/_react["default"].createElement("g", {
565
- transform: "translate(" + x + ", " + y + ")",
566
- clipPath: axisType === "x" && isC || isIOS && axisType === "x" ? "url(#".concat(clipPathIdRef.current, ")") : undefined
554
+ }, /*#__PURE__*/_react["default"].createElement("g", {
555
+ transform: "translate(" + x + ", " + y + ")"
567
556
  }, /*#__PURE__*/_react["default"].createElement("g", {
568
557
  ref: ref
569
558
  }, label && gridLine && drawLabel(), isC && /*#__PURE__*/_react["default"].createElement(AxisLine, {
@@ -43,7 +43,7 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.memo)(/*#__PURE__*/(
43
43
  onMouseMove: onMouseMove,
44
44
  ref: ref,
45
45
  style: _objectSpread({
46
- overflow: "visible",
46
+ overflow: "hidden",
47
47
  position: "absolute",
48
48
  width: width,
49
49
  height: height
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyv/charts",
3
- "version": "1.9.21",
3
+ "version": "1.9.22",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {
@@ -9,7 +9,6 @@ import React, {
9
9
  CSSProperties,
10
10
  MouseEventHandler,
11
11
  forwardRef,
12
- useRef,
13
12
  } from "react";
14
13
  import { getTickCoord, getGridCoord, getFontStyle } from "../utils";
15
14
  import { chartContext } from "../context";
@@ -308,7 +307,7 @@ const Label: (
308
307
  height="100%"
309
308
  // x={x}
310
309
  // y={y}
311
- style={{ overflow: "hidden" }}
310
+ style={{ overflow: "visible" }}
312
311
  >
313
312
  <div
314
313
  className={className}
@@ -397,11 +396,6 @@ export default memo(
397
396
  ) => {
398
397
  const { width, height, isIOS } = useContext(chartContext);
399
398
  const { cHeight, isC, cPercent, cBarX, cWidth, cBarWidth } = controlInfo;
400
- const clipPathIdRef = useRef(
401
- `axis-clip-${orientation}-${axisType}-${Math.random()
402
- .toString(36)
403
- .substr(2, 9)}`
404
- );
405
399
  const x = orientation == "right" ? width : 0;
406
400
  const y = orientation == "bottom" ? height - cHeight : 0;
407
401
 
@@ -714,34 +708,10 @@ export default memo(
714
708
  <svg
715
709
  width={width}
716
710
  style={{
717
- overflow: "hidden",
711
+ overflow: axisType === "x" && isC ? "hidden" : "visible",
718
712
  }}
719
713
  >
720
- {/* 定义裁剪路径:用于iOS端超出隐藏 */}
721
- {(axisType === "x" && isC) || (isIOS && axisType === "x") ? (
722
- <defs>
723
- <clipPath
724
- id={clipPathIdRef.current}
725
- clipPathUnits="userSpaceOnUse"
726
- >
727
- <rect
728
- x="0"
729
- y="0"
730
- width={xLineRange}
731
- height={height + 200}
732
- fill="transparent"
733
- />
734
- </clipPath>
735
- </defs>
736
- ) : null}
737
- <g
738
- transform={"translate(" + x + ", " + y + ")"}
739
- clipPath={
740
- (axisType === "x" && isC) || (isIOS && axisType === "x")
741
- ? `url(#${clipPathIdRef.current})`
742
- : undefined
743
- }
744
- >
714
+ <g transform={"translate(" + x + ", " + y + ")"}>
745
715
  {/* 用于控制图 */}
746
716
  <g ref={ref as any}>
747
717
  {label && gridLine && drawLabel()}
@@ -512,6 +512,7 @@ const Chart = memo(
512
512
  style={{ ...style, position: "absolute" }}
513
513
  width={width}
514
514
  height={height}
515
+
515
516
  marginLeft={marginLeft}
516
517
  marginTop={marginTop}
517
518
  onMouseEnter={() => {
@@ -54,7 +54,7 @@ export default memo(
54
54
  onMouseMove={onMouseMove}
55
55
  ref={ref}
56
56
  style={{
57
- overflow: "visible",
57
+ overflow: "hidden",
58
58
  position: "absolute",
59
59
  width,
60
60
  height,