Trazo
Enhanced chart widgets for ratatui terminal UIs.
ratatui's built-in chart widgets (Chart, BarChart, Sparkline) are functional but limited. Trazo extends them with stacked and grouped bars, candlesticks, heatmaps, area plots, richer axes with auto-tick and date formatting — all as drop-in widgets that implement ratatui::widgets::Widget.
Status: early development.
0.0.xis published on crates.io to claim the name and unblock downstreamCargo.tomlentries; no widgets are usable yet and APIs will break freely between0.0.xreleases.
Motivation
| Capability | ratatui::widgets 0.30 |
trazo (planned) |
|---|---|---|
| Stacked bars | — | ✓ |
| Grouped bars (side-by-side) | partial | ✓ |
| Percent-stacked bars | — | ✓ |
| Candlestick (OHLC) | — | ✓ |
| Heatmap | — | ✓ |
| Area / stacked area | — | ✓ |
| Negative bar values | — | ✓ |
| Auto-tick axes | — | ✓ |
| Date / time axes | manual | ✓ |
f64 data |
u64 only |
✓ |
Roadmap
Widgets land one at a time. Each starts from a design document in docs/design/ with API rationale, ASCII mockups, and open questions:
- BarChart — single + stacked first, then grouped + percent-stacked. (design)
- Render styles & interactive playground — pluggable backends (ascii, ascii+color, half-block, octants, braille) and a
cargo run --example playgroundTUI to test them live. (design) - AreaChart — single + stacked area.
- Candlestick — OHLC, optional volume sub-chart.
- Heatmap — sequential and diverging palettes.
- LineChart — improved over ratatui's
Chart(multiple series, dual axes, markers). - Sparkline — improved (multiple series, thresholds).
- Axes — auto-tick, date/time formatting, log scale (extracted once two widgets share it).
- Legend — shared widget (extracted once two widgets share it).
Compatibility
Targets ratatui 0.30. Once trazo ships its first widget, a tested matrix will track ratatui releases.
Documentation
- API reference: https://docs.rs/trazo (once published).
- Design documents:
docs/design/.
License
Dual-licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.