Rectangle
Renders a rectangle element. Unlike the rect SVG element, this component supports rounded corners and animation. This component accepts X and Y coordinates in pixels. If you need to position the rectangle based on your chart's data, consider using the ReferenceArea component instead.
Props
animationBeginnumberoptional
默认值:
0animationDurationnumberoptional
默认值:
1500animationEasing(union of 9 variants)optional
默认值:
"ease"classNamestringoptional
heightnumber | stringoptional
Height of the rectangle in pixels.
默认值:
0isAnimationActivebooleanoptional
默认值:
falseisUpdateAnimationActivebooleanoptional
默认值:
falseradius[number, number, number, number] | numberoptional
The radius of corners.
If you provide a single number, it applies to all four corners. If you provide an array of four numbers, they apply to top-left, top-right, bottom-right, bottom-left corners respectively.
默认值:
0widthnumber | stringoptional
Width of the rectangle in pixels.
默认值:
0xnumber | stringoptional
The x-coordinate of top left point of the rectangle.
默认值:
0ynumber | stringoptional
The y-coordinate of top left point of the rectangle.
默认值:
0onClickReact.MouseEventHandler<T>optional
The customized event handler of click on the rectangle
onMouseDownReact.MouseEventHandler<T>optional
The customized event handler of mousedown on the rectangle
onMouseEnterReact.MouseEventHandler<T>optional
The customized event handler of mouseenter on the rectangle
onMouseLeaveReact.MouseEventHandler<T>optional
The customized event handler of mouseleave on the rectangle
onMouseMoveReact.MouseEventHandler<T>optional
The customized event handler of mousemove on the rectangle
onMouseOutReact.MouseEventHandler<T>optional
The customized event handler of mouseout on the rectangle
onMouseOverReact.MouseEventHandler<T>optional
The customized event handler of mouseover on the rectangle
onMouseUpReact.MouseEventHandler<T>optional
The customized event handler of mouseup on the rectangle