module RatatuiRuby::Symbols::Bar
Vertical bar characters for sparklines and bar charts.
Sparklines and vertical bar charts need characters that show partial fill. Memorizing Unicode lower block characters is tedious and error-prone.
This module exposes both individual characters and predefined sets. Use the sets with Sparkline widget, or use individual characters for custom visualizations.
Examples
# Use NINE_LEVELS for high-resolution sparklines (default) sparkline = tui.sparkline(data: [1, 2, 3], bar_set: Symbols::Bar::NINE_LEVELS) # Use THREE_LEVELS for simpler rendering sparkline = tui.sparkline(data: [1, 2, 3], bar_set: Symbols::Bar::THREE_LEVELS)
Constants
- FIVE_EIGHTHS
-
5/8 height bar.
- FULL
-
Full height bar (8/8).
- HALF
-
Half height bar (4/8).
- NINE_LEVELS
-
High-resolution bar set with 9 distinct levels.
- ONE_EIGHTH
-
1/8 height bar.
- ONE_QUARTER
-
1/4 height bar (2/8).
- SEVEN_EIGHTHS
-
7/8 height bar.
- THREE_EIGHTHS
-
3/8 height bar.
- THREE_LEVELS
-
Low-resolution bar set with 3 levels (full, half, empty).
- THREE_QUARTERS
-
3/4 height bar (6/8).