# `ExRatatui.Widgets.Bar`
[🔗](https://github.com/mcass19/ex_ratatui/blob/v0.8.2/lib/ex_ratatui/widgets/bar.ex#L1)

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 shared `bar_style`
  * `:text_value` - optional string replacing the rendered numeric value
    (e.g. `"80%"` or `"$42k"`); when `nil`, `value` is rendered as-is

## Examples

    iex> %ExRatatui.Widgets.Bar{label: "Elixir", value: 80}
    %ExRatatui.Widgets.Bar{
      label: "Elixir",
      value: 80,
      style: nil,
      text_value: nil
    }

# `t`

```elixir
@type t() :: %ExRatatui.Widgets.Bar{
  label: String.t(),
  style: ExRatatui.Style.t() | nil,
  text_value: String.t() | nil,
  value: non_neg_integer()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
