Size and lazy loading
You ship what you draw. nervure has no dependency, and each chart is a module of its own.
| In the bundle | Minified | Gzipped | Brotli | Time to bundle |
|---|---|---|---|---|
| One chart: gauge | 13.2 kB | 5.9 kB | 5.3 kB | 9 ms |
| One chart: pie | 15.9 kB | 7.1 kB | 6.4 kB | 9 ms |
| Lines and bars | 27.2 kB | 11.4 kB | 10.3 kB | 7 ms |
| Candlestick | 16.9 kB | 7.5 kB | 6.8 kB | 6 ms |
| Map | 22 kB | 9.5 kB | 8.6 kB | 6 ms |
| Every chart | 137.6 kB | 48 kB | 41.3 kB | 30 ms |
| Live data only | 2.3 kB | 1.1 kB | 1 kB | 2 ms |
With nervure/lazy, 6.7 kB load at the start, and each chart type is a file of its own. Building the SVG of a chart takes 0.5 ms in the middle of the 84 samples and 9.7 ms for the slowest, in jsdom. Measured on 2026-12-01 with esbuild, unknown, Node v22.23.5. Run it yourself: npm run bench.
Pick your charts
import { createChart, registerChart } from 'nervure/core';
import { pie } from 'nervure/charts/basic/pie';
import { xy } from 'nervure/charts/basic/xy/index';
registerChart('pie', pie);
registerChart('xy', xy);The rest never enters your bundle. The source folder lists the paths.
Load when drawn
import { createChart, load } from 'nervure/lazy';
const chart = await createChart(host, spec); // fetches the code of its type, once
await load('sankey', 'map'); // ahead of timeVite, webpack, Rollup, esbuild and Parcel make a small file of each type. Before you give another type to chart.update, call load for it.
In a framework
nervure/react, nervure/vue and nervure/svelte hold every chart. nervure/react/core, nervure/vue/core and nervure/svelte/core hold none: register those you draw.
import { registerChart } from 'nervure/core';
import { gauge } from 'nervure/charts/basic/gauge';
import { Chart } from 'nervure/react/core';
registerChart('gauge', gauge);While it runs
A chart that is drawn does nothing: no loop, no timer. Live charts stop in hidden tabs, and draw at most ten times a second.