# `PhiaUi.Components.Data.BarTotals`
[🔗](https://github.com/charlenopires/PhiaUI/blob/v0.1.17/lib/phia_ui/components/data/bar_totals.ex#L1)

Sum labels rendered above stacked bar groups — pure SVG, zero JS.

Inspired by Nivo's BarTotals layer. Renders `<text>` elements showing
the total value at the top of each stacked bar group.

Designed to be composed inside a bar chart or xy_chart SVG.

## Examples

    <.bar_totals totals={[
      %{x: 72.0, y: 20.0, label: "350"},
      %{x: 152.0, y: 30.0, label: "280"}
    ]} />

# `bar_totals`

## Attributes

* `totals` (`:list`) (required) - List of `%{x, y, label}` for each group total.
* `font_size` (`:string`) - Override font size (defaults to theme). Defaults to `nil`.
* `offset` (`:integer`) - Pixels above bar top. Defaults to `6`.
* `theme` (`:map`) - Chart theme overrides. Defaults to `%{}`.
* `class` (`:string`) - Defaults to `nil`.
* Global attributes are accepted.

---

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