Renders a closed polygon shape from a set of coordinate points. The Polygon component connects a series of points to create a closed shape. It can handle discontinuous data and optionally render an area between two sets of points (like a range area).Documentation Index
Fetch the complete documentation index at: https://mintlify.com/recharts/recharts/llms.txt
Use this file to discover all available pages before exploring further.
Props
Data
The coordinates of all the vertexes of the polygon, as an array of objects with x and y coordinates.
Optional baseline points for creating a range polygon.When provided, the polygon is rendered as an area between the
points and baseLinePoints.Whether to connect segments across null points.When
false, gaps appear in the polygon where data points are null.
When true, the polygon connects across null values.Appearance
CSS class name to apply to the polygon element.
SVG properties
This component accepts all standard SVG polygon element properties including:fill- Fill colorstroke- Stroke colorstrokeWidth- Stroke widthopacity- Opacity valuestyle- Inline styles
Events
Event handler for click events on the polygon.
Event handler for mousedown events on the polygon.
Event handler for mouseup events on the polygon.
Event handler for mousemove events on the polygon.
Event handler for mouseover events on the polygon.
Event handler for mouseout events on the polygon.
Event handler for mouseenter events on the polygon.
Event handler for mouseleave events on the polygon.