A single bar within a ExRatatui.Widgets.BarChart.
Fields
:label- plain string shown next to the bar (required):value- non-negative integer the bar length is scaled against (required):style- optional%ExRatatui.Style{}overriding the chart's sharedbar_style:text_value- optional string replacing the rendered numeric value (e.g."80%"or"$42k"); whennil,valueis rendered as-is
Examples
iex> %ExRatatui.Widgets.Bar{label: "Elixir", value: 80}
%ExRatatui.Widgets.Bar{
label: "Elixir",
value: 80,
style: nil,
text_value: nil
}
Summary
Types
@type t() :: %ExRatatui.Widgets.Bar{ label: String.t(), style: ExRatatui.Style.t() | nil, text_value: String.t() | nil, value: non_neg_integer() }