| Crates.io | tui-bar-graph |
| lib.rs | tui-bar-graph |
| version | 0.3.1 |
| created_at | 2025-03-04 06:29:57.823686+00 |
| updated_at | 2025-12-27 07:18:03.606132+00 |
| description | A Ratatui widget for rendering pretty bar graphs in the terminal |
| homepage | |
| repository | https://github.com/joshka/tui-widgets |
| max_upload_size | |
| id | 1576822 |
| size | 90,332 |
A Ratatui widget to render bold, colorful bar graphs. Part of the tui-widgets suite by Joshka.


Uses the Colorgrad crate for gradient coloring.
GitHub Repository · API Docs · Examples · Changelog · Contributing
cargo add ratatui tui-bar-graph
Build a BarGraph with your data and render it in a widget area.
use tui_bar_graph::{BarGraph, BarStyle, ColorMode};
let data = vec![0.0, 0.1, 0.2, 0.3, 0.4, 0.5];
let bar_graph = BarGraph::new(data)
.with_gradient(colorgrad::preset::turbo())
.with_bar_style(BarStyle::Braille)
.with_color_mode(ColorMode::VerticalGradient);
frame.render_widget(bar_graph, area);
For the full suite of widgets, see tui-widgets.
Copyright (c) Josh McKinney
This project is licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See CONTRIBUTING.md.