blockcharts alpha

Benchmarks

The same charts drawn by blockcharts and seven other chart libraries, timed in Chrome: 100 runs of every library at every count. The code is in the repository, so you can run it on your own machine.

34ms
to draw and paint a dashboard of 20 charts (1.7 ms a chart)
1.5–10×
faster than Chart.js, ECharts, ApexCharts, Plotly and Recharts at 20 and 355 charts
7.6MB
of memory for 355 charts; Chart.js 35.1, ECharts 40.0
43KB
of JavaScript on the page, gzipped, with the basic kit

Not the fastest of all: uPlot, a library made for time series on canvas, draws these charts 1.4 to 2.0 times as fast. Observable Plot, which draws SVG too, is on a par among 355 charts and 1.3 times slower for a dashboard of 20. blockcharts draws an element per bar, with the CSS and accessibility that come with it, and is still ahead of the canvas libraries Chart.js and ECharts.

Measured on 2026-11-26: 11th Gen Intel Core i7-11800H @ 2.30GHz, 32 GB of memory, Windows 11 (build 26300), Chrome 158.0.8127.38. A slower machine takes longer for every library, and the order hardly changes (see the slowed CPU below).

A dashboard: 20 charts

The time from the first chart's code to the frame that shows all 20, painted. blockcharts takes 33.8 ms, 1.7 ms a chart; the median of 100 runs.

355 charts

As many charts as every example of the gallery five times over. A chart among many costs less: 0.91 ms each, as what a page does once is shared.

A page's only chart

The first chart pays for what a page does once: the browser compiles the library's code and loads the system font for the first text it draws (5 to 6 ms in a trace, for every library). blockcharts takes 15.0 ms; only uPlot draws it sooner.

On a slower CPU

The same 20 charts with Chrome's CPU slowed four times, as DevTools does it: roughly a mid-range phone. Every library takes longer (5.1 to 5.5 times), and blockcharts stays ahead of the same five. blockcharts: 181 ms.

Every run

The 100 runs of each library at 20 charts: the box holds the middle half of them, the line across it is the median, the whiskers reach the rest and a dot is a run far from them. The figures are steady: the middle half of every library's runs is within 5 % of its median.

Memory and code

The memory the 355 charts hold after a garbage collection, and the JavaScript each page loads, gzipped.

All the figures

Medians of 100 runs. Quartiles: half of the runs fall between them. × blockcharts: the time against blockcharts' at the same count. Main thread: the time Chrome's main thread was busy meanwhile. Memory and DOM nodes: what the charts hold.

A dashboard: 20 charts
LibraryTime, msQuartilesA chart, ms× blockchartsMain thread, msMemory, MBDOM nodes
uPlot 23.6 ms 23.2–24.5 1.18 0.7 24.7 0.9 MB 240
blockcharts 33.8 ms 33.0–35.3 1.69 1.0 35.9 1.1 MB 871
Observable Plot 43.0 ms 42.2–44.4 2.15 1.3 45.5 1.6 MB 1,166
Chart.js 70.9 ms 69.6–72.9 3.54 2.1 70.3 3.0 MB 40
ECharts 88.2 ms 85.2–91.5 4.41 2.6 89.1 4.2 MB 81
ApexCharts 132 ms 130–137 6.59 3.9 134 3.9 MB 2,328
Plotly 150 ms 147–153 7.50 4.4 152 3.8 MB 3,012
Recharts 203 ms 200–207 10.17 6.0 205 15.9 MB 2,483
355 charts
LibraryTime, msQuartilesA chart, ms× blockchartsMain thread, msMemory, MBDOM nodes
uPlot 162 ms 159–166 0.46 0.5 162 6.8 MB 4,260
blockcharts 321 ms 317–328 0.91 1.0 330 7.6 MB 15,456
Observable Plot 322 ms 317–327 0.91 1.0 331 10.1 MB 20,760
Chart.js 485 ms 482–498 1.37 1.5 482 35.1 MB 710
ECharts 679 ms 675–693 1.91 2.1 679 40.0 MB 1,421
Plotly 1,936 ms 1,920–1,974 5.45 6.0 1,943 30.0 MB 53,449
Recharts 2,146 ms 2,124–2,186 6.04 6.7 2,158 236.3 MB 44,050
ApexCharts 3,366 ms 3,337–3,459 9.48 10.5 3,387 33.0 MB 41,285
One chart
LibraryTime, msQuartilesA chart, ms× blockchartsMain thread, msMemory, MBDOM nodes
uPlot 12.3 ms 11.7–12.9 12.25 0.8 12.8 0.2 MB 12
blockcharts 15.0 ms 14.5–15.7 15.00 1.0 16.4 0.4 MB 57
Observable Plot 17.5 ms 17.2–18.5 17.55 1.2 18.9 0.5 MB 78
Chart.js 30.8 ms 30.3–31.9 30.85 2.1 31.0 0.6 MB 2
ECharts 31.4 ms 30.7–32.6 31.35 2.1 32.4 0.9 MB 5
Plotly 36.0 ms 35.5–36.7 36.00 2.4 37.1 0.9 MB 172
ApexCharts 37.1 ms 36.4–38.1 37.15 2.5 38.6 1.0 MB 144
Recharts 49.0 ms 48.1–50.4 49.00 3.3 50.1 2.1 MB 154
20 charts, the CPU slowed four times
LibraryTime, msQuartilesA chart, ms× blockchartsMain thread, msMemory, MBDOM nodes
uPlot 125 ms 121–132 6.24 0.7 130 0.9 MB 240
blockcharts 181 ms 175–192 9.07 1.0 192 1.1 MB 871
Observable Plot 234 ms 228–249 11.72 1.3 243 1.6 MB 1,166
Chart.js 359 ms 351–371 17.94 2.0 356 3.0 MB 40
ECharts 457 ms 442–475 22.84 2.5 461 4.2 MB 81
ApexCharts 714 ms 700–738 35.70 3.9 724 3.9 MB 2,328
Plotly 829 ms 810–859 41.44 4.6 836 3.8 MB 3,012
Recharts 1,054 ms 1,041–1,086 52.69 5.8 1,063 15.8 MB 2,483
One chart, the CPU slowed four times
LibraryTime, msQuartilesA chart, ms× blockchartsMain thread, msMemory, MBDOM nodes
uPlot 61.1 ms 58.5–65.4 61.10 0.8 65.3 0.2 MB 12
blockcharts 81.1 ms 76.9–87.3 81.15 1.0 88.9 0.4 MB 57
Observable Plot 96.6 ms 91.5–101 96.55 1.2 104 0.5 MB 78
Chart.js 160 ms 155–168 160.35 2.0 160 0.6 MB 2
ECharts 172 ms 165–181 171.75 2.1 177 0.9 MB 5
Plotly 200 ms 195–211 199.65 2.5 206 0.9 MB 172
ApexCharts 203 ms 195–214 203.20 2.5 210 1.0 MB 144
Recharts 268 ms 261–277 268.35 3.3 273 2.1 MB 154

What every library draws

Bars over 12 categories and a line of 200 points, alternating, each 360 × 200 px, with two axes and a tooltip, no animation and no legend. Here are the two, drawn live by blockcharts from the spec and the rows the bench uses:

the bar chart's spec

{
  "size": [360, 200],
  "scales": { "x": { "type": "band" }, "y": { "type": "linear", "zero": true } },
  "guides": [{ "type": "axis", "scale": "x" }, { "type": "axis", "scale": "y" }],
  "marks": [{ "type": "rect", "x": "k", "y": "v" }],
  "interaction": [{ "type": "tooltip" }]
}

Each library draws them as its own documentation says to, with what it needs to show the same things:

LibraryVersionDraws inSet upJS, KB gzip
blockcharts 0.0.5 SVG the basic kit; each chart’s rows given to the lake 43
Chart.js 4.6.2 canvas chart.js/auto; not responsive 71
ECharts 6.1.0 canvas only the modules these charts use; the tooltip on the axis 176
uPlot 1.6.32 canvas its stylesheet; no tooltip in uPlot, its cursor stays on 24
Observable Plot 0.6.19 SVG tip: true; it orders the bars by name 94
Recharts 3.11.1 SVG React 19, all the charts in one root 193
ApexCharts 8.9.1 SVG toolbar and zoom off 289
Plotly 4.3.0 SVG the mode bar off 1,447

How it is measured

What these figures do not say

Run it yourself

The bench is test/bench (one page per library, and the charts in charts.cjs) and scripts/bench.js, which builds the pages, runs them in your Chrome and prints the tables. It needs Node.js 22 and Chrome.

shell

git clone https://github.com/boligolov/blockcharts.git
cd blockcharts
npm ci                          # the library's tools
npm ci --prefix test/bench      # the other libraries, at the versions measured here
npm run bench -- --runs=100     # 1, 20 and 355 charts; about 35 minutes
node scripts/bench.js --runs=100 --cpu=4 --n=1,20    # the CPU slowed four times

The figures on this page are test/bench/results.json and results-cpu4.json, every run included; --save writes them. The method and the options are in the bench's README.