Skip to content
Skip to the article
Docs
Edit this page

Chart Gallery

Live charts on Pyreon's own engine — marks as JSX children, one flat draw list, no third-party charting library.

On this page

Every chart on this page is live: it runs on @pyreon/charts, Pyreon's own engine, in this page. Charts follow the page's scheme: the color-scheme the page declares on <html> (this site sets it with its theme toggle), else the OS preference. Each example's source is one click away.

@pyreon/chartsstable

A trend

An area under a smoothed line, its points and a dashed target. One currencyformatter feeds the axis, the tooltip and the accessible table at once.

Revenue against target

Stacked or grouped

The same three series, switched between a stack and side-by-side bars. The mark list is reactive, so the switch repaints the same canvas.

Orders by channel

A ranking

horizontal turns the category axis on its side; showValues labels each bar.

Horizontal bars

A rank chart and a depth profile

<Axis y inverse> reverses the value axis: here rank 1 sits at the top, and depth increases downward. The data and the table keep their order.

Rank and depth, inverted

Scaled axes

xScale and yScale take log, sqrt and symlog: the picture reshapes, the tick labels, the tooltip and the table keep the real values.

Linear, sqrt, symlog and log x

Bar thickness

barWidth caps one bar's thickness in px, barGap spaces the bars of a group andbarCategoryGap the categories. Unset, bars keep their band-proportional width.

Bar width and gaps

Bars on a time axis

xValue puts each bar at its own x: the slot is the smallest gap between two x values (barSpan sets it explicitly, in x units), bars are centred on their day and the axis is padded by half a slot, so a missing day is an empty stretch, not a squeezed bar.

Daily revenue with missing days

Colour a datum

fill={fillBy('status')} reads a colour off each row; fill={shadeBy('margin')}maps a value through a ramp, and the tooltip and the accessible table print that value.

Per-datum colour

A donut

An <Arc> with an inner radius, and a legend whose entries toggle their slices.

Donut

A radar

Radar

Candlesticks

A 120-day price series with a navigator strip: drag the strip's band or a handle, or scroll and drag inside the plot. The day labels thin to what fits.

Candlesticks with a navigator

A heatmap

Activity by weekday and hour, one <Cell> per observation.

Heatmap

Direct labels

<Legend direct /> names each line at its last point, in the line's own colour, instead of in a legend box.

Direct labels

A keyed sliding window

"Vary" drops the oldest bar and appends a new one. by="t" gives each row an identity, so every bar tweens from its own previous value; without it, rows match by position and each bar animates toward its neighbour's value.

Sliding window

A time axis

xValue places each point at its epoch-ms timestamp, so uneven gaps between samples stay uneven on screen. <Axis x time> picks calendar ticks anddate('MMM YYYY') labels them.

Time axis

A funnel

One <Stage> per row, drawn largest first.

Funnel

A boxplot

BoxplotChart takes raw samples per category and computes the quartiles, whiskers and outliers itself. (Pass summary instead when you already have the five numbers.)

Boxplot

A calendar

One cell per day, keyed by ISO date, between start and end.

Calendar

A chord diagram

Flows between a set of nodes, each ribbon as wide as its value at both ends.

Chord

A Gantt chart

Tasks grouped into lanes, with progress, dependency elbows and a milestone.

Gantt

A network graph

Nodes on a circle, sized by value and coloured by category. layout also takes 'force', or 'none' for positions you supply.

Graph

Parallel coordinates

One polyline per row across several axes; an axis can be categorical.

Parallel coordinates

A polar chart

Bars and a line on polar axes, the categories around the angle.

Polar

A river

A streamgraph: layers stacked around a centre line.

River

A Sankey diagram

Flows from sources through intermediate nodes to outcomes, each link as wide as its value.

Sankey

A sunburst

A hierarchy as rings; a parent without a value is the sum of its children.

Sunburst

A tree

The same kind of hierarchy drawn as nodes and links, left to right.

Tree

A map

A choropleth over GeoJSON: hover outlines a region, a click keeps it selected (selectedMode), the keyboard walks and selects the regions, and the tooltip reads the feature's own properties. The enclave and the lake are inner rings, cut out of the fill. (Hover, selection and the tooltip formatter are web-only for now; native warns by name.)

Map with holes, selection and feature properties

Maps from the data package

@pyreon/charts-maps ships the countries of the world (Natural Earth 1:110m) and the US states (Census 1:20m) as one lazy module per map, each with the projection it was prepared for. The data is public-domain, generalised for overview maps: country borders are 1:110m (a few small states and islands are missing or merged) and the states are 1:20m. The larger scales (world-50m and us-counties, about 230 KB gzip each) are not shipped yet; the build script can produce them.

World choropleth: Equal Earth, sphere, graticule, no-data hatch, fit to a country
US states in Albers USA

Bubbles and flows

Point marks sized by value get a size key (sizeLegend); flows draw great-circle arcs whose progress is arc length on the sphere, and an arc across the seam is two runs, never a chord.

Bubble map with a size key
Flows along great circles

A treemap

Each leaf a rectangle with area proportional to its value, nested inside its parent.

Treemap

A single axis

Points along one axis, sized by a second value.

Single axis

A gauge driven by a signal

gaugeDial() builds the full dial; writing the signal repaints it.

Gauge

100,000 points

Every point drawn, no decimation. "Regenerate" replaces all of them and reports how long the redraw took on your machine. (maxPoints decimates to the plot's pixel width when you want the same picture for a fraction of the work.)

100,000 points, redrawn

A live stream

A new sample every 250ms into a 60-point window. Each write repaints the canvas and nothing else: the chart is one effect over one signal.

Streaming

Against ECharts

The same charts are measured against ECharts 6 in examples/benchmark(bun run bench:charts for speed in real Chromium, bun run bench:charts-bundlefor gzipped size). See Benchmarks for current measurements.

Pyreon renders an offscreen data table (up to 1,000 rows) for screen readers by default; ECharts renders none. The table fills after the first paint, so it stays out of the first frame. accessibleTable={false} turns it off.

Was this page helpful?