# Bar Chart: Stat & chart element for AI agents

> Bouncy bar chart: the title bounces in, outlined bars in cycling colours spring up from the baseline with values popping on top, and a badge slaps onto the tallest

Canonical page: https://agentframes.ai/elements/sunburst/bar-chart/
Markdown: https://agentframes.ai/elements/sunburst/bar-chart.md

## Overview

- Name: Bar Chart (`barChart`), an element: one HyperFrames block per size
- Part of: the [Sunburst](https://agentframes.ai/packs/sunburst.md) pack (5 of 43). Available only through the All-access subscription.
- Category: Stat & chart
- Purpose: Bouncy bar chart: the title bounces in, outlined bars in cycling colours spring up from the baseline with values popping on top, and a badge slaps onto the tallest
- Pack: [Sunburst](https://agentframes.ai/packs/sunburst.md), included in All-access (from $14/month billed annually ($168/year), or $19 monthly)
- Subscribe: POST https://agentframes.ai/api/checkout/subscribe with interval=month or interval=year (optional currency=USD|GBP|EUR|AUD|CAD; 303 redirect to Stripe checkout; a human pays there). Then download any pack with the subscriber key: https://agentframes.ai/account.md
- Aspects: 1:1 (native), 4:5 (stage-fit), 9:16 (stage-fit), 16:9 (stage-fit)
- Canvases: works on slate field (`s`), coral field (`r`), blue field (`b`); avoid mustard field (`m`), paper (`p`), swirl burst (coral on paper) (`x`), ray burst (blue on paper) (`z`)
- Typical duration: 4.2s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/sunburst/bar-chart.mp4
- Poster: https://agentframes.ai/media/sunburst/bar-chart.jpg
- Native 1:1 preview (watermarked): https://agentframes.ai/media/sunburst/bar-chart-native.mp4
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Sunburst pack. Add a `barChart` beat to plan.json on a `s` canvas with slots `title`, `bars`, `prefix`, `top`, `colors`, `badgeColor` and `labelColor` from my script. Then run validate → build → qa and show me qa/contact.jpg.
```

## Variables

| Variable | Type | Label | Description | Default |
|---|---|---|---|---|
| `title` | string | Title | Plain text. | my thrift spend |
| `bars` | json | Bars | JSON array; keep the same shape as the default. | [["wk 1",14],["wk 2",9],["wk 3",20],["wk 4",6],["wk 5",12]] |
| `prefix` | string | Prefix | Plain text. | £ |
| `top` | string | Top | Plain text. | record! |
| `colors` | json | Colors | JSON array; keep the same shape as the default. | ["coral","mustard","blue","lilac","paper"] |
| `badgeColor` | string | Badge Color | Plain text. | mustard |
| `labelColor` | string | Label Color | Plain text. | white |

## What your agent can change

### Surface

Bouncy bar chart: the title bounces in, outlined bars in cycling colours spring up from the baseline with values popping on top, and a badge slaps onto the tallest. Category: `stat`. Canvases: ok `s, r, b`; avoid `m, p, x, z` (the element vanishes on these). Typical 4.2s; settles at 2.2s.

### Editable (fill through plan.json `slots`)

- `title` (string) **EXAMPLE DATA: replace or get client sign-off**. Plain text.
- `bars` (json) **EXAMPLE DATA: replace or get client sign-off**. JSON array; keep the same shape as the default.
- `prefix` (string). Plain text.
- `top` (string). Plain text.
- `colors` (json). JSON array; keep the same shape as the default.
- `badgeColor` (string). Plain text.
- `labelColor` (string). Plain text.

### Protected

Do not change the motion, timing, easing, bounce, the palette roles (colours come from frame.md → tokens.css), fonts, or the element's internal layout. Keep copy close to the default length (±25%) so it fits.

### Safe editing

Set values in the beat's `slots` in plan.json, run `tools/validate.mjs`, rebuild, and check `qa/contact.jpg`. Never hand-edit the generated index.html or this element's code for a single video.

## FAQ

### What can my AI agent change in Bar Chart?

Your agent fills the `title`, `bars`, `prefix`, `top`, `colors`, `badgeColor` and `labelColor` slots through plan.json. Motion, timing, palette, fonts and the internal layout are protected, so the result keeps the Sunburst look.

### Which aspect ratios does Bar Chart support?

Bar Chart is designed natively for 1:1 and stage-fits into 4:5, 9:16 and 16:9. A typical beat lasts 4.2s.

### How do I get Bar Chart?

Bar Chart is included in the Sunburst pack, which is part of the AgentFrames All-access subscription along with 42 other templates in this pack and every other pack on the store. You get the full source, the editing contracts and the agent instructions.

## More in Sunburst

- [3-2-1 Countdown](https://agentframes.ai/elements/sunburst/countdown-badge.md): Countdown: a big badge slaps on 3, 2, 1 in new colours, then a sunburst flashes up behind and the reveal line bounces in
- [Number Counter](https://agentframes.ai/elements/sunburst/number-counter.md): Big number: a label says what's counted, a wide outlined pill boings in and the outlined number counts up inside it, then a badge slaps the unit on its corner
- [Keep or Donate Poll](https://agentframes.ai/elements/sunburst/poll-ovals.md): Poll results: the question bounces in, two oval option windows boing open, dot grids under each fill to its share of the vote as the percentages count up, the winner gets a badge
- [Dot-Grid Percentage](https://agentframes.ai/elements/sunburst/stat-waffle.md): Dot-grid waffle chart: outlined card with the big outlined percentage counting up while a 10x10 dot grid fills dot by dot to the same number; a pill lands the point

## Community

Coming soon.
