Skip to main content
Recharts provides extensive customization options through props, custom components, and styling. You can tailor every visual aspect to match your design requirements.

Styling with props

Most Recharts components accept standard SVG presentation attributes.

Basic styling

All standard SVG properties work: stroke, fill, strokeWidth, opacity, strokeDasharray, etc.

Color customization

Gradients and patterns

Use SVG gradients for sophisticated fills:

Custom shapes

Replace default shapes with custom renderers.

Custom dots

Custom shape components receive props like cx, cy, x, y, width, height, payload, and value depending on the chart type.

Custom bars

Custom pie sectors

Custom labels

Axis labels

Data labels

Custom tooltips

Create fully custom tooltip content:
Custom tooltip components receive active (boolean), payload (array of data), and label (axis label) props.

Custom legends

Conditional styling

Apply different styles based on data values:

Data-driven colors

Animation customization

Control animation behavior:
Available easing options:
  • ease (default)
  • ease-in
  • ease-out
  • ease-in-out
  • linear

Active states

Customize hover and active states:

Custom active shape

Theme integration

Create reusable theme configurations:

Accessibility

Add ARIA attributes and semantic markup:
The accessibilityLayer prop enables keyboard navigation and screen reader support. Individual data points become focusable and announce their values.