Feature Library

More chart types: treemap, box plot, calendar, radar…

0.52 CPU ms
A still of the More chart types: treemap, box plot, calendar, radar… demo
Still
The live demo starts when it’s in view.Pick a chart · hover or tap its marks · Tab to it and use the arrow keys · Table shows its numbers

Fifteen chart types as plain functions that return SVG, each with its numbers as a table and words for every mark.

What it costs a frame

0.52 ms
GPU
not used
CPU, median
0.52 ms
CPU, 95th pct
2.12 ms
Draw calls
0
Weight
Moderate

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured while the gallery cycles: every frame draws the next of the fifteen chart types at the stage’s size (the SVG string, innerHTML and the explorer’s listeners, without the draw-in), with new data after each full pass. Idle, nothing runs. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.522.12
apple · Apple A19 Proin a browser tab · 16 November 2026not timed1.045.26
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.903.28

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. Dashboards and reports
  2. Budgets and shares of a whole
  3. Response times and other spreads
  4. Activity over a year
  5. Project plans
  6. Spotting when a process changed
  7. Summing dates per day, week or month
  8. Product comparisons

Pitfalls, in brief

  1. Import charts.base.css before charts.css: the base keeps line-shaped paths from filling and the hit areas invisible (without it they paint black over the chart).
  2. Draw each chart at the size it is shown and redraw when its box changes (a ResizeObserver): the labels are fitted to the pixels, so a scaled SVG stretches text and hairlines.
  3. The series colours are --mc-c1 to --mc-c6, set for a light background; put the mc-dark class on a container with a dark one, or set the six yourself.
  4. The tinted fills use color-mix(): in a browser older than 2023 they fall back to no fill.
  5. A waffle rounds to whole hundredths by largest remainders, so it always shows 100 squares, but an item under half a percent can get none: say its share in the key or the table.
8 more in brief
  1. A control chart needs one value a period, in time order, and about twenty periods before its limits mean much.
  2. explore() makes the chart one Tab stop and owns the arrow keys while it has focus.
  3. Every chart also returns its numbers as a table: offer it (tableHtml) next to the chart for screen readers and for checking, rather than only the SVG’s description.
  4. periodFor counts calendar periods touched, not their length: 1 to 21 October is 1 month, 4 ISO weeks and 21 days.
  5. An average per period (agg: “mean”) leaves out the periods with no values, even with fill: true: a control chart or a line of levels must not read an empty week as 0.
  6. Once a person picks a period, keep it (periodChoice with their choice): working the default out again when the data changes would undo it under them.
  7. retitle swaps only the words per/a/each/by day, week or month, and daily, weekly or monthly.
  8. The draw-in is CSS animation on the marks: pass motion: true only for a first showing or new data, not on every resize, and reduced motion turns it off in charts.css.
13 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From SpaciousPro. Fully custom code.

Bruls, Huizing and van Wijk, “Squarified Treemaps” (2000): squarify() follows the paper’s algorithm: rows laid along the shorter side while they make the worst aspect ratio better.

Viridis, by Stéfan van der Walt and Nathaniel Smith (matplotlib, CC0): The ten stops in VIRIDIS are sampled from the colour map, which is in the public domain (CC0).

Lee Byron and Martin Wattenberg, “Stacked Graphs: Geometry & Aesthetics” (2008): The streamgraph’s “least wiggle” baseline is the paper’s formula; the code is the owner’s.

Walter A. Shewhart, Economic Control of Quality of Manufactured Product (1931): The individuals and moving-range (XmR) chart: limits three sigmas from the average, sigma from the average moving range ÷ 1.128 (d₂ for ranges of two), the range limit at 3.268 (D₄). The run of seven is a common run rule.

John W. Tukey, Exploratory Data Analysis (1977): The box plot, its whiskers to the last values within 1.5 times the box’s height.

B. W. Silverman, Density Estimation for Statistics and Data Analysis (1986): The violins’ Gaussian kernel density, its width by his rule of thumb.

Florence Nightingale’s polar area diagrams (1858): The rose: equal angles, radius by the square root so each slice’s area is true.

George Marsaglia, “Xorshift RNGs” (2003): The demo’s seeded generator for its invented data.

svgchartstreemapbox plotviolincalendar heatmapstreamgraphganttcontrol charttime seriesperiodsradarparetoviridisaccessibilityno dependencies

Near it in the frame