rdom-charts
Terminal charts for rdom, the browser-faithful DOM for terminal applications: a time-series line chart, a sparkline, a bar chart, and a rich gauge.
Each chart paints onto a <canvas> element through rdom-tui's public API — sub-cell rasterized (a
2×4 braille dot grid for lines, eighth-block glyphs for bars) — so curves and fills look
smooth in a cell grid. Nothing reaches into rdom internals.
Looking for a table? It lives in the separate
rdom-virtualtablecrate.
Install
[]
= "0.1"
= "0.3.14"
Requires Rust 1.85+ (edition 2024).
Try it
# (100ms/150ms thresholds), single, dense, live,
# live-spotty, empty
Controls: +/- zoom · h/l or ←/→ pan · 0 reset · wheel zoom · drag pan · Ctrl-C quit.
Components
| Component | What it does |
|---|---|
TimeSeriesChart / TimeSeriesView |
Braille line chart: static + streaming, EMA smoothing, follow/zoom/pan, Guideline threshold lines, nice-tick axes, legend |
Sparkline / SparklineView |
Compact single-series line, no chrome, auto/pinned range, NaN gaps |
BarChart / BarChartView |
Horizontal labeled bars, eighth-block fill, auto/pinned scale, value readout |
Gauge / GaugeView |
Linear gauge with colored value zones, label + readout |
Example
use ;
use ;
let series = vec!;
let view = new;
let mut dom = new;
let root = dom.root;
let canvas = view.mount;
dom.append_child.unwrap;
dom.node_mut.set_width.set_height;
// Stream new samples later, then ask the runtime to repaint:
view.with;
License
MIT.