Recharts helps React apps render charts from declarative components such as axes, grids, legends, and series. It targets native SVG output with a small D3 footprint and installs via npm, Deno, or UMD.
Overview
Recharts is a charting library for React that combines React component composition with D3 calculations underneath. Teams assemble visuals by nesting chart types with axes, tooltips, grids, and data series instead of wiring imperative drawing code.
Each visual piece is meant to stay independent so a line chart, for example, mixes an X axis, tooltip, grid, and line elements as separate components. The library emphasizes deploying through React JSX, keeping SVG as the rendering layer, and limiting third-party weight.
Documentation and examples live on the project site and Storybook, covering line and other cartesian layouts plus customization through component props or swapped child components. Optional devtools exist for inspecting charts during development.
Packages publish to npm with a matching react-is peer, and builds also ship for Deno and as a UMD bundle on unpkg for script-tag use. The stated goal is to reduce friction when adding charts to single-page React applications bundled with tools such as Webpack.
Key features
- Declarative React chart components
- SVG-based rendering
- Lightweight D3 submodule usage
- Composable axes, grids, and series
- npm, Deno, and UMD distribution
- Customizable via component props
- Storybook and web documentation
- Optional chart devtools package
Use cases
- Dashboard line and area charts
- React admin analytics views
- Embedded metrics in SPAs
- Prototype charts in StackBlitz
- Reusable chart primitives in UI kits