@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.
package/lib/components/Axis.js
CHANGED
|
@@ -264,7 +264,7 @@ var Label = function Label(_ref5) {
|
|
|
264
264
|
// y={y}
|
|
265
265
|
,
|
|
266
266
|
style: {
|
|
267
|
-
overflow: "
|
|
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
|
-
},
|
|
556
|
-
|
|
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, {
|
package/package.json
CHANGED
package/src/components/Axis.tsx
CHANGED
|
@@ -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: "
|
|
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
|
-
{
|
|
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()}
|