React charting libraries

Updated Nov 2026

React charting libraries draw charts from data inside React apps. These libraries turn metrics, prices, and usage data into the charts on dashboards and reports.

Popularity

Recharts has the most monthly downloads in this comparison, at 256.8M.

LibraryMonthly downloadsStarsLast releaseLicense
Recharts
256.8M
27.7KNov 2026MIT
visx
40.7M
21.1KJun 2026MIT
react-chartjs-2
22.6M
6.9KOct 2025MIT
echarts-for-react
8.4M
5.0KNov 2026MIT
MUI X Charts
6.0M
5.9KNov 2026MIT
react-apexcharts
5.6M
1.4KNov 2026SEE LICENSE IN LICENSE.md
nivo
4.6M
14.1KMay 2025MIT
react-plotly.js
3.8M
1.1KJul 2026MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

Recharts builds each chart from separate React components. A LineChart, for example, holds an XAxis, a Tooltip, a CartesianGrid, and one Line per data series, all written as JSX. Every component renders SVG. The package installs together with react-is, which has to match the version of React in the app.

Downloads / mo
256.8M
Stars
27.7K
Last release
3.11.0
License
MIT

Strengths

  • Composes charts from React components. Combine axes, tooltips, grids, and lines as separate React components.
  • Resizes to its parent container. Use ResponsiveContainer to adapt charts to the parent’s size.

Limitations

  • PNG export needs a helper. The separate recharts-to-png package converts a rendered chart to a PNG image.

Quickstart

From README.md
$ npm install recharts react-is
import { LineChart, Line, XAxis, Tooltip, CartesianGrid } from 'recharts';
const data = [{ name: 'A', uv: 1 }, { name: 'B', uv: 2 }];
export default function Example() {
  return <LineChart width={400} height={240} data={data}><XAxis dataKey="name" /><Tooltip /><CartesianGrid stroke="#ccc" /><Line type="monotone" dataKey="uv" stroke="#8884d8" /></LineChart>;
}

Recharts examples

From open-source projects on GitHub

visx is a collection of low-level visualization components from Airbnb, published as separate packages such as @visx/shape, @visx/scale, and @visx/group. Scales turn data values into positions, and shapes such as Bar draw them inside an svg element that the app writes itself. An app installs only the packages it uses.

Downloads / mo
40.7M
Stars
21.1K
Last release
4.0.0
License
MIT

Strengths

  • Install only what's used. Each scale, shape, and axis package installs on its own.
  • Any React animation library. visx leaves animation to the React animation library an app already bundles.

Limitations

  • No built-in animation. Transitions come from a React animation library the app already uses.
  • Charts are assembled by hand. Axes, legends, and tooltips come from their own packages and are placed by the app.

Quickstart

From README.md
$ npm install --save @visx/shape
import React from 'react';
import {Bar} from '@visx/shape';

export default function BarGraph() {
  return (
    <svg width={160} height={180}>
      <Bar x={20} y={20} width={80} height={120} fill="#fc2e1c" />
    </svg>
  );
}

visx examples

From open-source projects on GitHub

react-chartjs-2

react-chartjs-2 provides React components, such as Line, Bar, and Doughnut, for Chart.js, a charting library that draws on an HTML canvas. Chart.js installs as its own package next to the wrapper. Each component takes data and options props in the Chart.js format. The chart types, scales, and plugins in use are imported and registered with ChartJS.register before the first render.

Downloads / mo
22.6M
Stars
6.9K
Last release
5.3.1
License
MIT

Strengths

  • Supports mixed chart types. Combine supported chart types in one Chart.js canvas.
  • Loads selected chart components. Import and register only the Chart.js components the application uses.

Limitations

  • Registration before render. A chart type, scale, or plugin that isn't registered with ChartJS.register fails to draw.
  • Styled through options. Colors, fonts, and borders are set in the chart options or plugins.

Quickstart

From README.md
$ npm i react-chartjs-2 chart.js
import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js';
import { Doughnut } from 'react-chartjs-2';
ChartJS.register(ArcElement, Tooltip, Legend);
const data = { labels: ['A', 'B'], datasets: [{ data: [1, 2] }] };
export default function Example() { return <Doughnut data={data} />; }

react-chartjs-2 examples

From open-source projects on GitHub

echarts-for-react

echarts-for-react renders Apache ECharts charts in React through one component, ReactECharts, which takes an ECharts option object. The echarts package installs separately, at the version the app chooses. Props such as notMerge, lazyUpdate, theme, and onEvents pass through to the engine. For any other ECharts call, getEchartsInstance() returns the chart instance. Importing from echarts-for-react/lib/core with only the needed chart modules keeps the bundle smaller.

Downloads / mo
8.4M
Stars
5.0K
Last release
3.1.0
License
MIT

Strengths

  • Exposes the ECharts instance. Use getEchartsInstance() to access the engine’s chart APIs.
  • Resizes when the window changes. Automatic window resizing is enabled by default.

Limitations

  • Separate engine install. The echarts package installs alongside the wrapper as a peer dependency.

Quickstart

From README.md
$ npm install --save echarts-for-react npm install --save echarts
import ReactECharts from 'echarts-for-react';
const option = { xAxis: { type: 'category', data: ['A', 'B'] }, yAxis: { type: 'value' }, series: [{ type: 'bar', data: [1, 2] }] };
export default function Example() { return <ReactECharts option={option} />; }

echarts-for-react examples

From open-source projects on GitHub

MUI X Charts is a set of React chart components from MUI that render SVG, covering bar, line, pie, scatter, gauge, and radar charts, among others. A chart can be used whole, such as BarChart with xAxis and series props, or composed from parts like ChartsXAxis and BarPlot inside a ChartsDataProvider. The community edition is MIT licensed and installs with Material UI and Emotion.

Downloads / mo
6.0M
Stars
5.9K
Last release
9.18.1
License
MIT

Strengths

  • Composable parts. Axes, plots, and legends combine inside a data provider to build custom charts.
  • Shared MUI theme. Charts follow the Material UI theme already set up in the app.

Limitations

  • Advanced charts are paid. Funnel, heatmap, and sankey charts, zooming, panning, and export need the commercial Pro plan.
  • WebGL needs Premium. WebGL rendering for dense data is part of the Premium plan.

Quickstart

From quickstart.md
$ npm install @mui/x-charts @mui/material @emotion/react @emotion/styled
import { BarChart } from '@mui/x-charts/BarChart';
export default function Example() {
  return (
<BarChart
  xAxis={[
    {
      id: 'barCategories',
      data: ['bar A', 'bar B', 'bar C'],
      height: 28,
    },
  ]}
  series={[
    {
      data: [2, 5, 3],
    },
  ]}
  height={300}
/>
  );
}

MUI X Charts examples

From open-source projects on GitHub

react-apexcharts

react-apexcharts is the React wrapper for ApexCharts, a JavaScript chart engine that installs alongside it. The Chart component takes an options object, a series array, a chart type such as bar, and a width and height. Changing series or any option re-renders the chart. A separate entry point, react-apexcharts/server, renders charts inside Next.js server components.

Downloads / mo
5.6M
Stars
1.4K
Last release
2.2.1
License
SEE LICENSE IN LICENSE.md

Strengths

  • Updates from props. Changing series or an option redraws the chart with no extra call.
  • Server rendering. The react-apexcharts/server import renders charts in Next.js server components.

Limitations

  • Separate engine install. The apexcharts package installs together with the wrapper.

Quickstart

From README.md
$ npm install react-apexcharts apexcharts
import Chart from 'react-apexcharts';
const options = { chart: { id: 'basic-bar' }, xaxis: { categories: ['A', 'B'] } };
const series = [{ name: 'Series', data: [1, 2] }];
export default function Example() { return <Chart options={options} series={series} type="bar" width={400} height={240} />; }

react-apexcharts examples

From open-source projects on GitHub

nivo is a set of chart packages, one per chart type, such as @nivo/line and @nivo/bar, each exporting a React component. A chart takes its data and settings as props on that one component. Many chart types come in SVG, HTML, and canvas versions. Motion transitions run on react-spring, and the project lists server-side rendering among its features.

Downloads / mo
4.6M
Stars
14.1K
Last release
0.99.0
License
MIT

Strengths

  • Offers SVG and Canvas renderers. Choose SVG or Canvas versions of the line chart.

Limitations

  • Canvas drops transitions. Canvas versions skip transitions and server rendering, which the SVG versions keep.
  • Responsive needs parent height. A responsive chart renders only inside a parent element with a set height.

Quickstart

From line.md
$ npm install @nivo/line
import { Line } from '@nivo/line';
const data = [{ id: 'Requests', data: [{ x: 'Mon', y: 1 }, { x: 'Tue', y: 2 }] }];
export default function Example() { return <Line width={400} height={240} data={data} />; }

nivo examples

From open-source projects on GitHub

react-plotly.js

react-plotly.js renders plotly.js charts through one React component, Plot, which takes data and layout props in the plotly.js format. A single data array can mix trace types, such as a scatter line and bars on the same axes. plotly.js installs as its own package. The component calls Plotly.react to redraw when data, layout, or config is replaced with a new object.

Downloads / mo
3.8M
Stars
1.1K
Last release
4.1.0
License
MIT

Strengths

  • Mixed trace types. One data array holds lines, bars, and other traces drawn on shared axes.
  • Event callbacks. Props such as onUpdate and onInitialized report the figure after each change.

Limitations

  • Updates need new objects. Editing a data array in place leaves the chart unchanged until data is replaced or revision changes.
  • Props can be mutated. The component may change its layout and data props in response to user input.

Quickstart

From README.md
$ npm install react-plotly.js plotly.js
import Plot from 'react-plotly.js';

function App() {
  return (
    <Plot
      data={[
        {
          x: [1, 2, 3],
          y: [2, 6, 3],
          type: 'scatter',
          mode: 'lines+markers',
          marker: {color: 'red'},
        },
        {type: 'bar', x: [1, 2, 3], y: [2, 5, 3]},
      ]}
      layout={{width: 320, height: 240, title: {text: 'A Fancy Plot'}}}
    />
  );
}

react-plotly.js examples

From open-source projects on GitHub

FAQ

To build charts from JSX components, use Recharts. For full control over every shape, visx supplies the low-level parts. To use an existing chart engine, pick its wrapper: react-chartjs-2 for Chart.js, echarts-for-react for Apache ECharts, or react-plotly.js for Plotly.

Recharts declares each chart as React components and renders SVG. Chart.js, used through react-chartjs-2, draws on a canvas from a data object and an options object, and each chart type, scale, and plugin is registered before use.

Recharts composes a chart from separate components for axes, grids, tooltips, and series. nivo exports one component per chart type, configured through props, and offers canvas versions of many charts besides SVG.

Recharts ships complete chart types such as LineChart and BarChart. visx ships scales, shapes, and axes as separate packages, and the app assembles its own chart inside an svg element.

Wrap the chart in ResponsiveContainer, which sets the chart's width and height from the size of its parent element.

MUI X Charts is a set of React chart components from MUI that render SVG. The community edition is MIT licensed, and the Pro and Premium plans add charts such as funnel and sankey, zoom, export, and WebGL rendering.

For coding agents

Found your charting library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official