JavaScript charting libraries

Updated Nov 2026

JavaScript charting libraries turn arrays of data into line, bar, pie, and other charts in the browser. Each one draws either SVG, where every bar and point is its own element on the page, or canvas, where the whole chart is one bitmap. These libraries draw the charts in analytics dashboards, financial reports, and monitoring tools.

Popularity

recharts has the most installs, while d3 has the most GitHub stars.

LibraryMonthly downloadsStarsLast releaseLicense
recharts
198.6M
27.7KJul 2026MIT
d3
106.7M
113.9KNov 2026ISC
Chart.js
50.0M
67.8KOct 2026MIT
echarts
30.6M
67.7KMay 2026Apache-2.0
highcharts
11.2M
12.5KSep 2026Custom license
apexcharts
9.3M
15.2KNov 2026Custom license
@observablehq/plot
4.2M
5.4KNov 2026ISC
uPlot
3.3M
10.6KMar 2025MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Features compared

LibraryShips TypeScript typesOffers React componentsZooms and pansRenders with WebGLOutput formats
rechartsBuilt-inBuilt-inBuilt-inUnsupportedHTML
d3UnsupportedUnsupportedBuilt-inUndocumentedHTML, SVG
Chart.jsBuilt-inUnsupportedVia pluginUndocumentedPNG
echartsBuilt-inUnsupportedBuilt-inVia pluginPNG, SVG
highchartsBuilt-inBuilt-inBuilt-inVia pluginPDF, PNG, JPEG
apexchartsBuilt-inVia pluginBuilt-inUnsupportedCSV, PNG, SVG
@observablehq/plotBuilt-inUnsupportedUnsupportedUnsupportedHTML, SVG
uPlotBuilt-inUnsupportedVia pluginUnsupportedPNG
Built-inVia pluginNot supportedNot documented

Libraries and code examples

Recharts builds charts in React out of separate components, drawn as SVG on top of d3. A chart component such as LineChart takes the data array. Its children, such as XAxis, Tooltip, CartesianGrid, and Line, each add one part of the chart. Each Line reads one field of every data item through its dataKey prop. Installing Recharts also installs react-is, which has to match the project's React version.

Downloads / mo
198.6M
Stars
27.7K
Last release
3.10.1, Jul 2026
License
MIT

Strengths

  • Charts as React components. Axes, tooltips, and series are JSX elements.
  • SVG output. Draws native SVG with few dependencies.

Limitations

  • React only. Charts are React components. Projects without React use a library such as Chart.js instead.
  • Matching react-is. The react-is package has to stay at the same version as the project's react package.

Quickstart

From the docs
$ npm install recharts
import { Line, LineChart } from 'recharts';

const data = [
  {
    uv: 400,
  },
  {
    uv: 300,
  },
  {
    uv: 320,
  },
];

<LineChart style={{ width: '100%', aspectRatio: 1.618, maxWidth: 600 }} responsive data={data}>
  <Line dataKey="uv" />
</LineChart>

recharts examples

From open-source projects on GitHub

Draws a responsive area chart of cumulative developer signups with Recharts AreaChart, XAxis and YAxis.

d3 is a toolbox of about thirty separate modules for drawing charts by hand, not a charting library with ready-made chart types. A stacked area chart, for example, combines a CSV parser, time and linear scales, a stack layout, an area generator that produces SVG path data, and axes. Selections create and change SVG or Canvas elements directly. When the data changes, the data join applies separate steps to elements that enter, update, or leave. For standard charts, the documentation points to Observable Plot, where a histogram takes one line instead of about fifty.

Downloads / mo
106.7M
Stars
113.9K
Last release
7.9.2, Nov 2026
License
ISC

Strengths

  • Any chart design. Scales, shapes, and layouts build fully custom visuals.
  • SVG or Canvas. Works directly with web standards, with no rendering layer of its own.
  • Updates changed elements. The data join changes only the elements that need it, with animated transitions.

Limitations

  • More code per chart. Even a basic chart takes a few dozen lines, because the toolbox has no chart abstraction.
  • No default look. Axes, layout, colors, and labels all come from the code each project writes.

Quickstart

From the docs
$ npm install d3
const width = 640;
const height = 400;
const marginRight = 20;
const marginBottom = 30;
const marginLeft = 40;

const x = d3.scaleUtc()
    .domain([new Date("2023-01-01"), new Date("2024-01-01")])
    .range([marginLeft, width - marginRight]);

const svg = d3.create("svg")
    .attr("width", width)
    .attr("height", height);

svg.append("g")
    .attr("transform", `translate(0,${height - marginBottom})`)
    .call(d3.axisBottom(x));

container.append(svg.node());

d3 examples

From open-source projects on GitHub

Sets up an SVG line chart with time and linear scales, bottom and left axes, and a line generator.

Fits the chart's scales to the data's extent and redraws both axes, animated when asked.

Chart.js draws charts onto an HTML canvas element. new Chart takes the canvas and one configuration object. Inside that object, type picks the chart, such as bar or line, while data contains the labels and datasets, and options sets the scales. Unlike Recharts, which builds SVG elements, Chart.js paints pixels, so a chart can also render inside a web worker by passing an OffscreenCanvas to the constructor.

Downloads / mo
50.0M
Stars
67.8K
Last release
4.6.1, Oct 2026
License
MIT

Strengths

  • Small bundle. Import only the chart types in use.
  • Handles big line charts. The decimation plugin thins data before drawing.
  • Draws off the main thread. Renders in a web worker through OffscreenCanvas.

Limitations

  • Large line charts. For tens of thousands of points, the docs recommend the decimation plugin, which reduces the data before the chart draws it.
  • Workers lose interactions. Inside a web worker, plugins that use the DOM, including mouse interactions, will likely not work. Resizing the chart also becomes manual.

Quickstart

From the docs
$ npm install chart.js
const ctx = document.getElementById('myChart');

new Chart(ctx, {
  type: 'bar',
  data: {
    labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
    datasets: [{
      label: '# of Votes',
      data: [12, 19, 3, 5, 2, 3],
      borderWidth: 1
    }]
  },
  options: {
    scales: {
      y: {
        beginAtZero: true
      }
    }
  }
});

Chart.js examples

From open-source projects on GitHub

Draws a Chart.js line chart on a canvas and redraws it each time its data subscription fires.

Apache ECharts draws interactive charts from a single option object. echarts.init attaches a chart instance to a container element. The option object passed to setOption lists the axes, the legend, the tooltip, and each series with its type and data. ECharts is written in JavaScript on zrender, a canvas drawing library. Extensions add three-dimensional plots and globes through ECharts GL, word clouds, and liquid fill charts.

Downloads / mo
30.6M
Stars
67.7K
Last release
6.1.0, May 2026
License
Apache-2.0

Strengths

  • Most chart types. The widest range of any open-source chart library.
  • Canvas or SVG. One config object, with a choice of renderer.

Limitations

  • Container needs a size. The container element needs a set width and height before echarts.init runs.
  • Wrappers are separate. Framework components come from separate packages, such as vue-echarts for Vue.

Quickstart

From the docs
$ npm install echarts
var myChart = echarts.init(document.getElementById('main'));

var option = {
  xAxis: {
    data: ['Shirts', 'Cardigans', 'Chiffons', 'Pants', 'Heels', 'Socks']
  },
  yAxis: {},
  series: [
    {
      type: 'bar',
      data: [5, 20, 36, 10, 10, 20]
    }
  ]
};

myChart.setOption(option);

echarts examples

From open-source projects on GitHub

Creates an ECharts chart in a Vue component, applies its option, and resizes it with the window.

Highcharts draws charts in SVG, with some Canvas and WebGL rendering. Highcharts.chart takes the id of a container element and an options object with the chart type, the title, the axes, and an array of series. Stock charts use a separate constructor, Highcharts.stockChart. To reduce file size, a project can create a custom build that combines only the modules it uses.

Downloads / mo
11.2M
Stars
12.5K
Last release
13.1.1, Sep 2026
License
Custom license

Strengths

  • Stock, map, and Gantt charts. Covers financial, map, and Gantt charts beyond the usual types.
  • Feature-complete. More features than most free chart libraries.
  • More complete than free libraries. It ships more chart features than most free open-source chart libraries.

Limitations

  • Source available. Highcharts is a source-available product, licensed through the Highcharts shop instead of under an open source license.

Quickstart

From the docs
$ npm install highcharts
document.addEventListener('DOMContentLoaded', function () {
  const chart = Highcharts.chart('container', {
    chart: {
      type: 'bar'
    },
    title: {
      text: 'Fruit Consumption'
    },
    xAxis: {
      categories: ['Apples', 'Bananas', 'Oranges']
    },
    yAxis: {
      title: {
        text: 'Fruit eaten'
      }
    },
    series: [{
      name: 'Jane',
      data: [1, 0, 4]
    }, {
      name: 'John',
      data: [5, 7, 3]
    }]
  });
});

highcharts examples

From open-source projects on GitHub

Draws a column chart of queue throughput with error bars in Highcharts, switching to a log scale on click.

ApexCharts draws interactive SVG charts from one configuration object, with no runtime dependencies. new ApexCharts takes a container element and the options, such as the chart type, the series, and the x-axis categories. Calling render then draws the chart. Official wrappers cover React, Vue, Angular, Blazor, and Stencil. For dense series, setting renderer to auto paints the data layer to a canvas above a point threshold while axes and tooltips stay SVG. A separate import, apexcharts/ssr, renders chart HTML on the server for frameworks such as Next.js.

Downloads / mo
9.3M
Stars
15.2K
Last release
8.8.1, Nov 2026
License
Custom license

Strengths

  • Zoom built in. No plugin needed; works with React, Vue, Angular, or plain JS.
  • Smooth data updates. Charts animate when the data changes.
  • Polished defaults. Looks finished without theme work.

Limitations

  • Premium features. A small set of advanced features, such as the unit and raincloud chart types, need a premium license key.
  • Extra chart imports. The default bundle leaves out chart types such as sunburst and violin, which need their own import.

Quickstart

From the README
$ npm install apexcharts
import ApexCharts from 'apexcharts'

const chart = new ApexCharts(document.querySelector('#chart'), {
  chart: { type: 'bar' },
  series: [{ name: 'Sales', data: [30, 40, 35, 50, 49, 60, 70, 91, 125] }],
  xaxis: { categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999] }
})

chart.render()

apexcharts examples

From open-source projects on GitHub

Renders a Redis cache stats chart with ApexCharts, destroying the previous chart first.

@observablehq/plot

Observable Plot charts tabular data by layering marks, such as dots, bars, lines, and rules, over shared scales. A plot specification assigns columns of the data to visual properties. Plot.dot(olympians, {x: "weight", y: "height"}), for example, draws a scatterplot with axes and scales chosen automatically. Transforms such as binX group the data before drawing, which turns the same table into a histogram. The d3 documentation recommends Plot unless a chart needs low-level control.

Downloads / mo
4.2M
Stars
5.4K
Last release
0.6.19, Nov 2026
License
ISC

Strengths

  • Short chart code. A few lines turn a table into a chart.
  • Built for exploration. Good defaults and built-in data transforms.

Limitations

  • React through a wrapper. React projects render plots inside a component of their own, either on the server through the document option or in the browser after mount.

Quickstart

From the docs
$ npm install @observablehq/plot
import * as Plot from "@observablehq/plot";

const plot = Plot.rectY({length: 10000}, Plot.binX({y: "count"}, {x: Math.random})).plot();
const div = document.querySelector("#myplot");
div.append(plot);

@observablehq/plot examples

From open-source projects on GitHub

Plots cost against accuracy with Observable Plot, drawing the Pareto frontier as a line and each program as a dot.

uPlot draws time series, lines, areas, OHLC, and bar charts on a Canvas, in a library of about fifty kilobytes minified. new uPlot takes an options object with the size and series styles, a data array, and a target element. The first row of the data array contains the x values. Each later row contains one series. According to the README, a cold start draws an interactive chart of more than a hundred and sixty thousand points in about twenty-five milliseconds. A live chart redrawing thousands of points sixty times a second uses about a quarter of the CPU that Chart.js needs.

Downloads / mo
3.3M
Stars
10.6K
Last release
1.6.32, Mar 2025
License
MIT

Strengths

  • Very fast time series. Draws 166,650 points in 25 ms from a cold start.
  • Live streaming data. Updates efficiently as new data arrives.
  • Plugins for tooltips and sync. Cursor sync and custom tooltips use one hooks API.

Limitations

  • No animations. Transitions and animations are left out by design.
  • No drag panning. Drag scrolling and panning come from plugins built on the hooks API, such as zoom-touch.
  • No data processing. Aggregation and statistics happen before the data reaches the chart, in tools such as simple-statistics.

Quickstart

From the docs
$ npm install uplot
let data = [
  [1546300800, 1546387200],    // x-values (timestamps)
  [        35,         71],    // y-values (series 1)
];

let opts = {
  width: 800,
  height: 600,
  series: [
    {},
    {
      stroke: "red",
    }
  ],
};

let uplot = new uPlot(opts, data, document.body);

uPlot examples

From open-source projects on GitHub

Creates a live telemetry chart with uPlot and buffers incoming measurements before pushing them to it.

FAQ

It depends on the chart. Recharts builds charts from React components and has 198.6M downloads a month. Chart.js draws to a canvas without a framework, ECharts stays responsive with large datasets, ApexCharts adds interactive dashboard features, and d3 suits fully custom charts.

Recharts is built for React, has 198.6M downloads a month, and builds charts from JSX components such as LineChart and Tooltip. highcharts ships an official React integration, and apexcharts offers a React wrapper. echarts needs a third-party wrapper, such as echarts-for-react.

recharts, Chart.js, and uPlot are free under the MIT license, d3 and @observablehq/plot under ISC, and echarts under Apache-2.0. highcharts and apexcharts charge for some commercial use. See Popularity for each license.

Highcharts needs a paid commercial license for any business use, including internal tools and prototypes. Personal and educational projects use it free. See highcharts.

echarts is the closest free alternative, with the widest range of chart types of any open-source library under the Apache-2.0 license. Chart.js is lighter and covers common charts such as line, bar, and pie under MIT.

uPlot is built for speed on time series, drawing 166,650 points in 25 ms from a cold start. ECharts also handles large datasets, and Chart.js thins big line charts with its decimation plugin. SVG libraries such as recharts and apexcharts slow down with thousands of points.

recharts fits React apps, building SVG charts from JSX components. Chart.js works in any web page, draws to a canvas from one config object, and thins big line charts with its decimation plugin. recharts has more downloads, at 198.6M a month against 50.0M.

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