Selective loading and measured bundle sizes

Reproducible sizes for the actual Core release and each optional type, with architectural limits.

View .md Agent setup

This report is pinned to the last measured Core 1.1.1; the latest verified public Core is 1.1.5. Use the download page for current release information. This historical report does not measure Core 1.1.5. These measurements cover the exact public 1.1.1 Core archive, SHA-256 75dfc0e458a24a035b0ddcd1eeb69dd66ac80ad5528143e55e45129e8a1caaaf. They describe transferred code size, not rendering time.

Start with the standard Core

For line, bar, area, scatter, pie and the other standard Core types, install the pinned package and import its normal entry. The Full Free bundle is convenient when you need every free type and feature; it is not required for a basic chart.

sh
npm install west-coast-charts@1.1.1
js
import WestCoastCharts from 'west-coast-charts'

const chart = new WestCoastCharts(document.querySelector('#chart'), {
  chart: { type: 'line', height: 320 },
  series: [{ name: 'Requests', data: [12, 19, 15] }],
  xaxis: { categories: ['09:00', '10:00', '11:00'] }
})
await chart.render()

Add an optional type when its view opens

js
async function showGauge(element, options) {
  const { default: gauge } = await import('west-coast-charts/types/gauge')
  WestCoastCharts.use(gauge)
  const chart = new WestCoastCharts(element, options)
  await chart.render()
  return chart
}

Use the same Core instance to register the module and construct the chart. A dynamic import can defer optional code; its final chunk boundaries depend on your bundler.

Actual compressed sizes

The released browser-script Core is 194,881 bytes gzip; Full Free is 379,544 bytes gzip. The table below measures a separate, clean ESM consumer build with esbuild 0.27.7. Its Core baseline is 197,451 bytes gzip. Different output formats and minifiers explain the difference; the two measurements are not interchangeable.

Consumer recipe Entry Total gzip bytes Increment over same consumer Core
Line / standard Core types west-coast-charts 197,451 0
bar-race west-coast-charts/types/bar-race 241,019 43,568
beeswarm west-coast-charts/types/beeswarm 248,149 50,698
box-plot west-coast-charts/types/box-plot 242,022 44,571
calendar west-coast-charts/types/calendar 241,017 43,566
decimate west-coast-charts/types/decimate 198,253 802
dumbbell west-coast-charts/types/dumbbell 243,270 45,819
funnel west-coast-charts/types/funnel 241,019 43,568
gauge west-coast-charts/types/gauge 246,933 49,482
histogram west-coast-charts/types/histogram 241,017 43,566
icicle west-coast-charts/types/icicle 246,921 49,470
nested-treemap west-coast-charts/types/nested-treemap 251,692 54,241
slope west-coast-charts/types/slope 241,017 43,566
streamgraph west-coast-charts/types/streamgraph 241,017 43,566
sunburst west-coast-charts/types/sunburst 247,912 50,461
themes west-coast-charts/types/themes 199,325 1,874
unit west-coast-charts/types/unit 252,650 55,199
violin west-coast-charts/types/violin 244,809 47,358
waterfall west-coast-charts/types/waterfall 243,081 45,630
All free types and features west-coast-charts/full 390,585 —

Gzip uses level 9. Decimal kB means bytes divided by 1,000. All builds retain licence comments, target ES2020 and enable tree shaking. The machine-readable report includes raw bytes, Brotli quality 6 bytes, output hashes and resolved input modules. Optional type increments include their shared runtime, not just the small type entry file. An entry-point graph cannot establish that every function in a shared module was removed.

The current architectural limit

The Core already includes the standard renderers and shared engine. In 1.1.1, west-coast-charts/core aliases the normal entry; it is not a smaller engine. Selective optional-type imports avoid loading all optional entry points, but do not turn a basic line chart into a tiny standalone renderer. The approximately 195 kB released Core remains a real trade-off for simple pages. No smaller runtime or size reduction is claimed here.

A future minimal-engine entry would need an explicit renderer registry, separate standard-renderer modules, combination-chart tests and measured consumer builds. It would preserve the existing entry for compatibility. This is a design direction, not a feature of 1.1.1 or a release promise.

Reproduce and check

Download the measurement script, the release manifest, and its exact Core TGZ. Install esbuild 0.27.7 in a temporary project. Run the script from that project, supplying the downloaded paths:

sh
npm install --save-exact esbuild@0.27.7
node measure-runtime-recipes.mjs --release=manifest.json --tgz=west-coast-charts-1.1.1.tgz --out=measurements

The script rejects a wrong archive hash, a version mismatch, runtime npm dependencies, unrelated optional type entry points and Premium runtime inputs. It installs offline with lifecycle scripts disabled, then writes each consumer bundle and its esbuild module graph. For byte-identical compressed results use Node v26.5.0 and zlib 1.2.12; other compressor versions can differ. CI rebuilds consumers from the actual archive and checks uncompressed output hashes and module graphs. Exact compressed-byte checks use the recorded zlib toolchain; a different compressor is not silently treated as an identical size result.

Getting started · Chart option conventions · Maintenance and security

Website release recipe for the pinned public artifact. Its measurements and checks are documented on this page; imported library guides retain their separate source provenance.