Skip to content

Diagrams

Hierarchy, flow and composition charts. Each is a pure layout function plus a builder that feeds one patches (or line) layer — no new WebGL code.

ChartBuilderPure layout
TreemapaddTreemap(plot, { items, colors })treemapLayout
FunneladdFunnel(plot, { items, neck })funnelLayout
SunburstaddSunburst(plot, { root })sunburstLayout
GaugeaddGauge(plot, { value, min, max, thresholds })gaugeLayout
SankeyaddSankey(plot, { nodes, links })sankeyLayout
ChordaddChord(plot, { matrix, labels })chordLayout
Parallel coordinatesaddParallelCoordinates(plot, { dimensions, rows })parallelLayout

The layouts are exported so you can compute geometry without rendering — for tests, for server-side work, or to draw it yourself.

colors accepts a palette name, an inline array, or anything registered with registerPalette. Set equalAspect: true on the plot for the radial ones (sunburst, chord, gauge) so they stay circular.

MIT licensed. WebGL2 required.