Renders an SVG element that serves as the root container for SVG content. All Recharts charts already include a Surface component internally, so you would not normally use this component directly. However, it can be useful when building custom visualizations outside of the standard chart components. This component wraps the standard SVG element.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
Size
The width of the SVG surface. Can be a number (pixels) or a string (e.g., “100%”).
The height of the SVG surface. Can be a number (pixels) or a string (e.g., “100%”).
Viewport
The SVG viewBox attribute, defining the position and dimension of the viewport.If not provided, defaults to
{ x: 0, y: 0, width, height } based on the width and height props.Appearance
CSS class name to apply to the SVG element.
Inline styles to apply to the SVG element.
Accessibility
The title of the SVG, rendered as a
<title> element for accessibility.The description of the SVG, rendered as a
<desc> element for accessibility.Content
SVG elements to render inside the Surface.
SVG properties
This component accepts all standard SVG element properties including:xmlns- XML namespacexmlnsXlink- XLink namespacepreserveAspectRatio- How to scale the viewBox