# Sparklines in a sentence

> Use sparklines in a sentence to put a trend right beside the words that describe it, word-sized and on one shared scale.

- Data type: Values over time (`time`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`time`)
- Example: **Solar went from almost nothing to more than a fifth of Chile's electricity** (Share of electricity generated from solar, %, 2010 to 2024)
- How to read it: Each tiny line beside a name is that country's solar share from 2010 to 2024, all on the same scale.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: none passed; closest 9:16

## Use it when
- the text carries the story and the trend backs it up
- a few series, each named in the prose
- space is tight, as in a report or a post

## Avoid it when
- readers must read exact values off the lines
- more than about 8 sparklines in one paragraph
- the series have different units

## Fields (data.json)
- `years` (year): the shared time axis
- `series[].name` (category): the country or the world
- `series[].values` (number, unit "%", format percent): % of electricity from solar, 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 sparkline to read its first and last value and its biggest jump
- Motion: Each sparkline draws on in reading order, with its end dot landing last.
- Sound: No sound of its own: quiet while it draws and between steps; mute it from its card. (sound is off until the viewer turns it on)

## Example spec
```json
{
  "chart": "sparkline-sentence",
  "title": "Solar went from almost nothing to more than a fifth of Chile's electricity",
  "subtitle": "Share of electricity generated from solar, %, 2010 to 2024",
  "data": "/charts/sparkline-sentence.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

Inspired by: [Sparklines: theory and practice](https://www.edwardtufte.com/notebook/sparkline-theory-and-practice-edward-tufte/), Edward Tufte (linked, not copied).

Live: /charts/sparkline-sentence · Manifest: /charts/sparkline-sentence.json · Tags: sparkline, inline chart, word-sized, text, energy, solar
