# Bar Chart: Bars + Hover Tooltip: Stat & chart element for AI agents

> Compare a few values on a zero baseline; the cursor hovers the highlighted bar to read it out.

Canonical page: https://agentframes.ai/elements/clay-ink-explainer/bar-chart/
Markdown: https://agentframes.ai/elements/clay-ink-explainer/bar-chart.md

## Overview

- Name: Bar Chart: Bars + Hover Tooltip (`barChart`), an element: one HyperFrames block per size
- Part of: the [Clay & Ink: Explainer](https://agentframes.ai/packs/clay-ink-explainer.md) pack (8 of 50). Available only through the All-access subscription.
- Category: Stat & chart
- Purpose: Compare a few values on a zero baseline; the cursor hovers the highlighted bar to read it out.
- Pack: [Clay & Ink: Explainer](https://agentframes.ai/packs/clay-ink-explainer.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: 16:9 (native), 9:16 (native), 4:5 (native), 1:1 (native)
- Canvases: works on Paper (ivory) (`paper`), Dusk (sky blue + halftone) (`dusk`), Night (near-black + stars) (`night`); avoid none
- Typical duration: 9s
- Speaker-safe: no
- Preview video (watermarked): https://agentframes.ai/media/clay-ink-explainer/bar-chart.mp4
- Poster: https://agentframes.ai/media/clay-ink-explainer/bar-chart.jpg
- Licence: [AgentFrames Licence](https://agentframes.ai/licence.md)

## Paste this into Claude Code

```text
Use the AgentFrames Clay & Ink: Explainer pack. Add a `barChart` beat to plan.json on a `paper` canvas with slots `eyebrow`, `title`, `unit`, `max`, `decimals`, `data`, `highlight` and `note` from my script. Then run validate → build → qa and show me qa/contact.jpg.
```

## Variables

| Variable | Type | Label | Description | Default |
|---|---|---|---|---|
| `eyebrow` | string | eyebrow | {"type":"string","minLength":0,"maxLength":24} |  |
| `title` | string | title | {"type":"string","minLength":0,"maxLength":60} | Where a typical week goes |
| `unit` | string | unit | {"type":"string","minLength":0,"maxLength":6} | h |
| `max` | number | max | {"type":"number","minimum":0.000001,"maximum":1000000000} | 20 |
| `decimals` | number | decimals | {"type":"integer","minimum":0,"maximum":2} | 0 |
| `data` | string | data | JSON string. {"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":24},"value":{"type":"number","minimum":0,"maximum":1000000000}},"required":["label","value"]},"minItems":2,"maxItems":6} | [{"label":"Meetings","value":14},{"label":"Deep work","value":9},{"label":"Email","value":6},{"label":"Admin","value":3}] |
| `highlight` | number | highlight | {"type":"integer","minimum":-1,"maximum":5} | -1 |
| `note` | string | note | {"type":"string","minLength":0,"maxLength":60} | Illustrative data |

## What your agent can change

Compare a few values on a zero baseline; the cursor hovers the highlighted bar to read it out.

Native 1920x1080, 9 s at 30 fps. Full-frame graphics block; use the variant that matches your project size.
Motion: change: bars grow from zero to their value (no overshoot); attention: the hover tooltip names the one that matters.

### Edit

Set per-instance values in the host mount's `data-variable-values` (nested values are JSON strings). The block validates every value before it draws and throws a readable error naming the slot (see the console / `data-cie-error` on the root) instead of silently trimming or shrinking content.

- `eyebrow`: `{"type":"string","minLength":0,"maxLength":24}`
- `title`: `{"type":"string","minLength":0,"maxLength":60}`
- `unit`: `{"type":"string","minLength":0,"maxLength":6}`
- `max` (required): `{"type":"number","minimum":0.000001,"maximum":1000000000}`
- `decimals`: `{"type":"integer","minimum":0,"maximum":2}`
- `data` (required): JSON string; `{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":24},"value":{"type":"number","minimum":0,"maximum":1000000000}},"required":["label","value"]},"minItems":2,"maxItems":6}`
- `highlight`: `{"type":"integer","minimum":-1,"maximum":5}`
- `note`: `{"type":"string","minLength":0,"maxLength":60}`

Bars start at zero; max sets the full track length and every value must be 0 to max. Negative values are not supported. highlight: zero-based bar in the accent colour with the tooltip; -1 picks the largest. decimals: 0 to 2. note: show "Illustrative data" for example numbers.

Style (from brand.json): `colourway` (paper, dusk, night), `accent` (hex), `brandName` (wordmark text), `mark` (spark, dot, none, or an inline base64 image).

### Timing

Content settles by 60% of the block (5.4 s) and holds for reading; the last 0.45 s draws out. To give longer copy more time, raise the block's `data-duration` and the mount's `data-duration` together; the engine's checks use the duration you set.

### Example mount

```html
<div id="scene-1" data-composition-id="af-clay-ink-explainer-bar-chart-16x9" data-composition-src="compositions/af-clay-ink-explainer-bar-chart-16x9.html" data-start="0" data-duration="9" data-width="1920" data-height="1080" data-track-index="0"
  data-variable-values='{"eyebrow":"","title":"Where a typical week goes","unit":"h","max":20,"decimals":0,"data":"[{\"label\":\"Meetings\",\"value\":14},{\"label\":\"Deep work\",\"value\":9},{\"label\":\"Email\",\"value\":6},{\"label\":\"Admin\",\"value\":3}]","highlight":-1,"note":"Illustrative data"}'></div>
```

Source: editable HTML; shared runtime `assets/af-clay-ink-explainer/cie.js` (component af-clay-ink-explainer-runtime). Fonts are OFL; logos and the spark are third-party marks (see TRADEMARKS.md).

## FAQ

### What can my AI agent change in Bar Chart: Bars + Hover Tooltip?

Your agent fills the `eyebrow`, `title`, `unit`, `max`, `decimals`, `data`, `highlight` and `note` slots through the block's data-variable-values (or the starter project's variables). Motion, timing, palette, fonts and the internal layout are protected, so the result keeps the Clay & Ink: Explainer look.

### Which aspect ratios does Bar Chart: Bars + Hover Tooltip support?

Bar Chart: Bars + Hover Tooltip is designed natively for 16:9, 9:16, 4:5 and 1:1. A typical beat lasts 9s.

### How do I get Bar Chart: Bars + Hover Tooltip?

Bar Chart: Bars + Hover Tooltip is included in the Clay & Ink: Explainer pack, which is part of the AgentFrames All-access subscription along with 49 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 Clay & Ink: Explainer

- [Big Statistic: KPI Cards](https://agentframes.ai/elements/clay-ink-explainer/big-statistic.md): Lead with the numbers: one to three KPI cards whose values count up.
- [Line Chart: Trend + End Value](https://agentframes.ai/elements/clay-ink-explainer/line-chart.md): Show a trend: the line draws across labelled gridlines and the latest value pulses at the end.
- [Share Split: Ring or Stacked Bar](https://agentframes.ai/elements/clay-ink-explainer/donut-chart.md): Split a whole into parts: shares count up in a stat row, then each segment sweeps in.
- [Pictogram Ratio: n of m](https://agentframes.ai/elements/clay-ink-explainer/pictogram-ratio.md): Make a ratio countable: a grid of tiles where the flagged ones flip to the accent.

## Community

Coming soon.
