# Parallel coordinates

> Use parallel coordinates to compare many measures per item at once: each item is a line crossing one vertical axis per measure, and you can brush axes to filter.

- Data type: Several measures per item (`relationships`)
- Free (MIT): install with `npx chartreuse add parallel-coordinates`, or registry item `/r/parallel-coordinates.json`
- Example: **The giants top almost every axis, but Earth is the densest world** (Nine measures for the eight planets and Pluto; each axis runs from the smallest value at the bottom to the largest at the top)
- How to read it: Each line is one world crossing nine axes; lines that stay high are big on everything, and a line that dips stands out on that measure.
- Interactive: filter
- Phone: Not recommended for mobile (On a phone marks are too small to see or tap (checked by eye)) · Video formats: none passed; closest 9:16

## Use it when
- 5 to 12 measures per item and you want profiles, not single pairs
- you want readers to filter by ranges (brushing)
- a few to a few hundred items

## Avoid it when
- readers need exact values (use a table)
- the order of the axes would change the story and you cannot justify one
- thousands of items with no brushing (lines turn to mud)
- more than 12 measures (only the first 12 are drawn) or more than six groups (the rest share one grey)

## Fields (data.json)
- `body` (category): the item, one line each (a planet in the example); every number column is an axis (2 to 12)
- `group` (category): optional: the item's group, for colour and the legend (else hints.groupOf names it)
- `distance` (number, unit "million km", format decimal): mean distance from the Sun, million km
- `diameter` (number, unit "km", format count): equatorial diameter, km
- `mass` (number, unit "× 10²⁴ kg", format decimal): mass, 10^24 kg
- `density` (number, unit "kg/m³", format count): mean density, kg/m3
- `gravity` (number, unit "m/s²", format decimal): surface gravity, m/s2
- `dayHours` (number, unit "hours", format decimal): length of a day (sunrise to sunrise), hours
- `yearDays` (number, unit "days", format decimal): orbital period, Earth days
- `temp` (number, unit "°C", format decimal): mean temperature, °C
- `moons` (number, unit "moons", format count): number of known moons

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 line or a name to read that world
- drag up or down on any axis to brush a range; brush several axes to combine filters
- Motion: Each world's line draws itself from left to right, one after another, nearest the Sun first.
- Sound: A pop on hover pitched by group. 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": "parallel-coordinates",
  "title": "The giants top almost every axis, but Earth is the densest world",
  "subtitle": "Nine measures for the eight planets and Pluto; each axis runs from the smallest value at the bottom to the largest at the top",
  "data": "/charts/parallel-coordinates.data.json"
}
```

## Source
Planetary Fact Sheet (metric), NASA Goddard Space Flight Center, NSSDCA (Public domain (US government work)), retrieved 2026-12-01: https://nssdc.gsfc.nasa.gov/planetary/factsheet/

Note: Day is the solar day; Venus's is 2,802 hours and Mercury's 4,223 hours. Moon counts change as new ones are confirmed. Pluto is a dwarf planet, kept for comparison.

Live: /charts/parallel-coordinates · Manifest: /charts/parallel-coordinates.json · Tags: parallel coordinates, multivariate, profiles, brushing, space, planets, solar system
