tui-bar-graph

Crates.iotui-bar-graph
lib.rstui-bar-graph
version0.3.1
created_at2025-03-04 06:29:57.823686+00
updated_at2025-12-27 07:18:03.606132+00
descriptionA Ratatui widget for rendering pretty bar graphs in the terminal
homepage
repositoryhttps://github.com/joshka/tui-widgets
max_upload_size
id1576822
size90,332
Josh McKinney (joshka)

documentation

https://docs.rs/tui-bar-graph

README

Tui-bar-graph

A Ratatui widget to render bold, colorful bar graphs. Part of the tui-widgets suite by Joshka.

Braille Rainbow Solid Plasma Quadrant Magma Octant Viridis

More examples

Braille Magma Braille Viridis Solid Inferno Solid Sinebow Quadrant Plasma Quadrant Sinebow Octant Inferno Octant Rainbow

Uses the Colorgrad crate for gradient coloring.

Crate badge Docs Badge Deps Badge License Badge Coverage Badge Discord Badge

GitHub Repository · API Docs · Examples · Changelog · Contributing

Installation

cargo add ratatui tui-bar-graph

Usage

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);

More widgets

For the full suite of widgets, see tui-widgets.

License

Copyright (c) Josh McKinney

This project is licensed under either of:

at your option.

Contribution

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.

Commit count: 383

cargo fmt