Skip to main content

Module spec

Module spec 

Source
Expand description

Chart intermediate representation.

This is the one contract that adapters, renderers (SVG, canvas, ratatui), and the JSON wire format all share. Serialises cleanly so the WASM canvas renderer can consume the same bytes the server produces.

Structs§

ChartSpec
A chart the server has already prepared. Renderers read this directly; none of them compute totals, pick top-N, or negate signs. All of that lives in the adapters.
Series
SeriesPoint
One x/y datum. y is carried as a num/denom pair so the exact Rational64 crosses the wire without float drift; each renderer converts to f64 for display.

Enums§

ChartKind