# `FrappeUIPhx.Charts.Bar`
[🔗](https://github.com/moacirbishopcamata/frappe_ui_phx/blob/v0.3.1/lib/frappe_ui_phx/charts/bar.ex#L1)

Gráfico de barras agrupadas (SVG no servidor, cores do tema, estados loading/empty/error).

# `bar_chart`

## Attributes

* `categories` (`:list`) (required)
* `series` (`:list`) (required) - [%{name: String, data: [number]}].
* `height` (`:integer`) - Defaults to `240`.
* `legend` (`:boolean`) - Defaults to `true`.
* `loading` (`:boolean`) - Defaults to `false`.
* `error` (`:string`) - Defaults to `nil`.
* `class` (`:any`) - Defaults to `nil`.
* Global attributes are accepted.

# `bars`

```elixir
@spec bars([String.t()], [map()], map()) :: [map()]
```

Retângulos de barras (função pura): `%{x, y, w, h, color, title}` por série e categoria.

---

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