# Bar Chart: Stat & chart element for AI agents

> Compare 3-7 values over time/categories; highlight the winner

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

## Overview

- Name: Bar Chart (`barChart`), an element: one HyperFrames block per size
- Part of: the [Sorbet](https://agentframes.ai/packs/sorbet.md) pack (41 of 42). Available only through the All-access subscription.
- Category: Stat & chart
- Purpose: Compare 3-7 values over time/categories; highlight the winner
- Pack: [Sorbet](https://agentframes.ai/packs/sorbet.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: 4:5 (native), 9:16 (stage-fit), 1:1 (stage-fit), 16:9 (stage-fit)
- Canvases: works on coral facets (`o`), raspberry facets (`k`), blush facets (`b`); avoid cream (`w`)
- Typical duration: 2.6s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/sorbet/bar-chart.mp4
- Poster: https://agentframes.ai/media/sorbet/bar-chart.jpg
- Native 4:5 preview (watermarked): https://agentframes.ai/media/sorbet/bar-chart-native.mp4
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Sorbet pack. Add a `barChart` beat to plan.json on a `o` canvas with slots `title`, `bars`, `highlight` and `unit` 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. | orders per month |
| `bars` | json | Bars | JSON array; keep the same shape as the default. | [["jan",42],["feb",58],["mar",51],["apr",77],["may",96]] |
| `highlight` | number | Highlight | Plain text. | 4 |
| `unit` | string | Unit | Plain text. |  |

## What your agent can change

### Surface

Compare 3-7 values over time/categories; highlight the winner. Category: `stat`. Canvases: ok `o, k, b`; avoid `w` (the element vanishes on these). Typical 2.6s; settles at 1.5s.

### 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.
- `highlight` (number). Plain text.
- `unit` (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`, `highlight` and `unit` slots through plan.json. Motion, timing, palette, fonts and the internal layout are protected, so the result keeps the Sorbet look.

### Which aspect ratios does Bar Chart support?

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

### How do I get Bar Chart?

Bar Chart is included in the Sorbet pack, which is part of the AgentFrames All-access subscription along with 41 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 Sorbet

- [Big Number](https://agentframes.ai/elements/sorbet/big-number.md): One huge number counting up in a cream circle, label and sparkles
- [Milestone](https://agentframes.ai/elements/sorbet/milestone.md): Milestone thank-you: number counts up, giant vertical wordmark, scrolling ticker rules
- [Number Counter](https://agentframes.ai/elements/sorbet/number-counter.md): Rolling counter: each digit spins on its own reel and lands in turn, with a label
- [Wordmark Reveal](https://agentframes.ai/elements/sorbet/wordmark-reveal.md): Brand reveal: giant cropped two-line wordmark, letters bounce in, tagline follows

## Community

Coming soon.
