# Trazo
Enhanced chart widgets for [ratatui](https://crates.io/crates/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.x` is published on [crates.io](https://crates.io/crates/trazo) to claim the name and unblock downstream `Cargo.toml` entries; no widgets are usable yet and APIs will break freely between `0.0.x` releases.
## Motivation
| 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/`](docs/design/) with API rationale, ASCII mockups, and open questions:
- [ ] **BarChart** — single + stacked first, then grouped + percent-stacked. ([design](docs/design/bar_chart.md))
- [ ] **Render styles & interactive playground** — pluggable backends (ascii, ascii+color, half-block, octants, braille) and a `cargo run --example playground` TUI to test them live. ([design](docs/design/playground.md))
- [ ] **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/`](docs/design/).
## License
Dual-licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT license ([LICENSE-MIT](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.