# Spine plot

> Use a spine plot to show two-way shares: each group is one 100% bar, as wide as the group is big, split by the outcome.

- 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: **Six in ten first-class passengers survived the Titanic; one in four in third class** (People aboard RMS Titanic by class and whether they survived, April 1912)
- How to read it: Each column is one class, as wide as its number aboard; the coloured part is the share who survived.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9, 9:16 (best 9:16)

## Use it when
- an outcome rate compared across groups of different sizes
- both the rate and the group size matter
- 2 to 8 groups, a yes/no or a few-part outcome

## Avoid it when
- the groups are about the same size (use a 100% stacked bar)
- readers need the counts more than the rates
- many outcome categories

## Fields (data.json)
- `class` (category): the column, 2 to 8 of them in the data's order (1st, 2nd, 3rd or crew in the example; long names in hints.groupNames)
- `sex` (category): an optional second grouping, a filter button each (Female or Male in the example; names in hints.sexNames)
- `survived` (number, unit "people", format count): the coloured outcome's count (people who survived in the example); its name is hints.outcomes[0]
- `died` (number, unit "people", format count): the other outcome's count (people who died in the example); its name is hints.outcomes[1]

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 column to read the counts and the rate
- Everyone, Women and girls, and Men and boys rebuild the columns for that group
- Motion: The survivors' share rises from the bottom class by class; switching groups slides the columns to their new widths and heights.
- Sound: A chime on the group buttons; 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)

## Example spec
```json
{
  "chart": "spine-plot",
  "title": "Six in ten first-class passengers survived the Titanic; one in four in third class",
  "subtitle": "People aboard RMS Titanic by class and whether they survived, April 1912",
  "data": "/charts/spine-plot.data.json"
}
```

## Source
Titanic: survival of passengers on the Titanic (R datasets), Rdatasets (British Board of Trade inquiry report, 1912, via Dawson 1995) (Public domain (1912 inquiry figures)), retrieved 2026-12-01: https://vincentarelbundock.github.io/Rdatasets/doc/datasets/Titanic.html

Note: The 1912 Board of Trade counts; later research revises some numbers slightly.

Live: /charts/spine-plot · Manifest: /charts/spine-plot.json · Tags: spine plot, mosaic, two-way, rates, history, titanic, survival, part to whole
