Recharts

A composable charting library for React, built on D3 and SVG.

Library
npm
v3.10.1
27,617 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
91 /100 Excellent
Development Activity 100
Maintenance 96
Community 68
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
87 /100 Excellent
Architecture 88
Code Quality 90
Innovation 85
Learning Curve 85

Recharts is a charting library built specifically for React, wrapping D3’s scale and shape math behind a declarative component API. Instead of imperatively wiring up SVG paths and axes, you compose charts from independent React components — <LineChart>, <XAxis>, <Tooltip>, <CartesianGrid>, <Line> — the same way you’d compose any other part of a React tree.

Under the hood, an internal Redux store (via @reduxjs/toolkit) coordinates shared chart state — axis domains, tooltip position, legend payloads, brush selection — across the independently-rendered child components, so each shape or axis component can read the layout it needs without prop drilling. The result is a library that covers the common chart types (line, bar, area, pie, radar, scatter, funnel, treemap, sankey, sunburst) with a consistent, TypeScript-typed API and full SVG output for styling and accessibility.

What You Get

  • A full set of chart types out of the box: LineChart, BarChart, AreaChart, PieChart, RadarChart, ScatterChart, ComposedChart, FunnelChart, Treemap, Sankey, and SunburstChart
  • Composable primitives (XAxis, YAxis, CartesianGrid, Tooltip, Legend, Brush, ReferenceLine/Area) that combine freely across chart types
  • First-class TypeScript types for every component’s props, generated and verified via an internal omnidoc tooling pipeline
  • A ResponsiveContainer component for automatic chart resizing inside fluid layouts
  • Built-in animation support for entering, updating, and transitioning data without extra animation libraries
  • Native SVG output, so charts inherit CSS styling, are inspectable in devtools, and support standard accessibility attributes

Common Use Cases

  • Adding dashboards and analytics views to a React or Next.js admin panel
  • Rendering time-series and financial charts (line/area) with custom tooltips and reference lines
  • Building comparison visualizations (bar, radar, pie) for reports or marketing pages
  • Visualizing hierarchical or flow data with Treemap, Sankey, and Sunburst chart types
  • Embedding lightweight, themeable charts in a design system alongside other UI components

Under The Hood

Architecture Recharts is a React charting library built on a layered architecture with a Redux-based internal state layer (src/state, using @reduxjs/toolkit) for cross-component communication of chart options, axis configuration, tooltip state, and synchronized data across composed chart primitives (CartesianChart.tsx, PolarChart.tsx, CategoricalChart.tsx). It renders SVG output via composable shape/component primitives (src/shape/Sector.tsx, src/component/Tooltip.tsx) wired together through React context providers (src/context/chartLayoutContext.tsx, tooltipContext.tsx) that broadcast layout and axis data down to consumer components without prop drilling. Chart types like LineChart, BarChart, AreaChart, PieChart, RadarChart, Sankey, Treemap, and SunburstChart are themselves declarative React component trees composed from these primitives (AreaChart.tsx, Treemap.tsx), while a victory-vendor dependency supplies D3-derived scale/shape math, and RechartsWrapper.tsx handles the top-level SVG canvas plus mouse/keyboard event dispatch through dedicated Redux middleware (mouseEventsMiddleware.ts, keyboardEventsMiddleware.ts).

Tech Stack A TypeScript-first codebase (98.6% TS) targeting React 16.8–19 and react-dom via broad peer-dependency ranges, using @reduxjs/toolkit + react-redux + reselect + immer for internal state, es-toolkit and decimal.js-light for utility/numeric precision, eventemitter3 for pub/sub, and victory-vendor for D3 scale/shape primitives. It’s built via Babel for a dual CJS/ES6 output plus a separate webpack UMD bundle, tested with Vitest (unit, mutation testing via Stryker, and visual regression via Playwright/Docker), linted with ESLint/Prettier, and documented via a custom omnidoc pipeline that auto-generates API docs and Storybook args from source comments.

Code Quality The repo has an exceptionally large test suite — 351 spec files under test/, mirroring the src/ directory 1:1 (test/cartesian/Area.spec.tsx, test/state/*), including typed variants (.typed.spec.tsx) that assert on TypeScript prop inference, animation-specific specs, and stacked/edge-case specs (Brush.stacked.spec.tsx). Combined with dedicated mutation testing (Stryker) and visual-regression testing (Playwright against Docker), this points to a mature, quality-conscious codebase. Naming is consistent (a Props type exported alongside each component, *Slice.ts for each Redux slice), and internal helper code favors tiny-invariant for fail-fast assertions.

API Design The public API in src/index.ts is large but consistently shaped — every component exports both the component and a Props type (SurfaceProps, LegendProps, TooltipProps), following idiomatic React “compose declarative JSX” ergonomics (<LineChart><XAxis/><Tooltip/><Line/></LineChart>) that requires minimal boilerplate to get a working chart, per the README’s own three-line example. The tradeoff is a steep prop surface once customizing tooltips, axes, or animation, but a generated Storybook, auto-generated API docs (via the omnidoc toolchain), and an extensive www documentation site significantly offset that with runnable, live-editable examples for nearly every primitive.

Used by 127 apps in this directory

TypeScript
89%
MIT

Plasmic

CMS · Design Tools · Low Code Platforms

7,082

The open-source visual builder that lets teams design React apps and websites with drag-and-drop while integrating seamlessly with your codebase.

View details
81
Repo Health
78
Technical
64
Dependency
Built with
TypeScript 89%
Updated yesterday
Python
63%
Apache 2.0

Polar

Developer Tools · Ecommerce · Invoicing Finance

10,345

Open source payments infrastructure that turns software into a business — subscriptions, usage-based billing, digital products, and merchant-of-record compliance in one platform.

View details
90
Repo Health
82
Technical
66
Dependency
Built with
Python 63%
TypeScript 30%
Updated yesterday
TypeScript
98%
MIT

Promptfoo

AI Development

25,857

An open-source CLI and library for evaluating and red-teaming LLM applications — replace trial-and-error prompt engineering with systematic evals, vulnerability scanning, and CI/CD integration.

View details
90
Repo Health
73
Technical
67
Dependency
Built with
TypeScript 98%
Updated today
Rust
72%
Apache 2.0

Rivet

AI Agents · Developer Tools

6,263

Stateful actors as a primitive for AI agents, real-time collaboration, and durable execution — with in-memory state, WebSockets, queues, and scheduling built in.

View details
87
Repo Health
81
Technical
64
Dependency
Built with
Rust 72%
TypeScript 25%
Updated today
TypeScript
98%
Apache 2.0

rowboat

AI Assistants · AI Development

18,003

Build, test, and deploy multi-agent AI workflows with a visual editor, RAG data sources, MCP tool integration, and a production-ready REST API.

View details
86
Repo Health
72
Technical
65
Dependency
Built with
TypeScript 98%
Updated yesterday
TypeScript
99%
MIT

Rudel

Developer Tools

305

Open-source analytics for Claude Code and Codex sessions — a CLI uploads session transcripts to a self-hostable dashboard tracking token usage, session duration, activity patterns, and model usage.

View details
75
Repo Health
67
Technical
71
Dependency
Built with
TypeScript 99%
Updated 6 days ago
TypeScript
97%
Other

Sourcebot

AI Code Assistants · Developer Tools · Search

3,985

A self-hosted, AI-powered code search engine that indexes every repo across GitHub, GitLab, Bitbucket, Gitea, Gerrit, and Azure DevOps, so both engineers and coding agents can search, browse, and ask questions about your codebase from one place.

View details
87
Repo Health
83
Technical
61
Dependency
Built with
TypeScript 97%
Updated today
Ruby
63%
BSD 3

Spree Commerce

CRM · Ecommerce · Marketing

15,749

Open-source headless eCommerce platform with a REST API, TypeScript SDK, and Next.js storefront for B2B, cross-border, and marketplace commerce — no vendor lock-in, no platform fees.

View details
91
Repo Health
84
Technical
81
Dependency
Built with
Ruby 63%
TypeScript 36%
Updated yesterday
TypeScript
89%
Other

Hexclave

Authentication · Developer Tools

6,859

The open-source user infrastructure platform — authentication, teams, payments, emails, analytics, and more on a single unified user model.

View details
88
Repo Health
80
Technical
66
Dependency
Built with
TypeScript 89%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers