# Sand jar

> Use sand jars to show shares or levels that fill up over time: each jar fills with grains to its value, and stepping through years pours more in.

- Data type: Shares of a total (`parts`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`parts`)
- Example: **Chile now makes a quarter of its electricity from the sun** (Share of electricity generated by solar power, %, 2014–2025)
- How to read it: Each jar is one country, filled to solar's share of its electricity; Play pours in year by year.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9, 9:16 (best 9:16)

## Use it when
- a few items each fill towards a shared ceiling (a share, a quota, a target)
- growth over a handful of years is the story
- a tactile, friendly view for a general audience

## Avoid it when
- values can be negative
- more than about 10 items
- readers need to compare close values exactly (use bars)

## Fields (data.json)
- `years` (year): the years, in order
- `places[].place` (place): the item, one jar each (2 to 10); the one named in hints.highlight is set apart
- `places[].shares` (number, unit "%", format percent): solar share of electricity, %, one per year

Units are the example's: with your own data, set each number field's `unit` and `format` (percent, count, decimal, currency, compact) in the meta you pass to mount, or `chartreuse render --unit field=text --format field=count`. Scales and labels follow your data.

## Interactions, motion, sound
- hover or tap a jar to read its share and its first-year starting point
- Play pours the jars year by year from the first year
- Motion: When the chart comes into view grains rain into every jar, bottom rows first, while the level and the number count up; each Play step pours in new grains or sifts the top ones away.
- Sound: A pop on hover. Quiet while it draws and between steps; mute it from its card. (sound is off until the viewer turns it on)
- Physics settings: gravity, size, seed (the Studio's Physics section, a look's `physics`, or `render --physics key=value`; docs/look-format.md)

## Example spec
```json
{
  "chart": "sand-jar",
  "title": "Chile now makes a quarter of its electricity from the sun",
  "subtitle": "Share of electricity generated by solar power, %, 2014–2025",
  "data": "/charts/sand-jar.data.json"
}
```

## Source
Share of electricity generated by solar power, Our World in Data (Ember; Energy Institute Statistical Review of World Energy) (CC BY 4.0), retrieved 2026-12-01: https://ourworldindata.org/grapher/share-electricity-solar

Note: The grains are drawn texture: the sand's level carries the value, not the count of grains.

Live: /charts/sand-jar · Manifest: /charts/sand-jar.json · Tags: fill, level, share, playful, solar, renewables, energy, climate
