class RatatuiRuby::BarChart
A widget that displays numeric data as a bar chart.
- data
-
A hash of { โLabelโ => value (Integer) }.
- bar_width
-
The width of each bar in the chart.
- bar_gap
-
The gap between bars.
- max
-
Optional maximum value for the Y-axis.
- style
-
Optional style for the bars.
- block
-
Optional block widget to wrap the chart.
Public Class Methods
Source
# File lib/ratatui_ruby/schema/bar_chart.rb, line 24 def initialize(data:, bar_width: 3, bar_gap: 1, max: nil, style: nil, block: nil) super end
- data
-
A hash of { โLabelโ => value (Integer) }.
- bar_width
-
The width of each bar in the chart.
- bar_gap
-
The gap between bars.
- max
-
Optional maximum value for the Y-axis.
- style
-
Optional style for the bars.
- block
-
Optional block widget to wrap the chart.
Calls superclass method