{
  "id": "legend-filter-scatter",
  "name": "Filter chips",
  "family": "relationships",
  "tier": "pro",
  "summary": "Use filter chips on a scatter when several groups overlap: each chip is both the legend and a switch that takes its group in or out.",
  "title": "Transits catch planets that race round their stars in days; radial velocity reaches slower giants",
  "subtitle": "3,052 confirmed exoplanets with a measured mass: orbital period (days) and mass (Earths), by discovery method",
  "howToRead": "Each dot is a planet: further right takes longer to orbit, higher is heavier; switch methods off and on with the chips under the chart.",
  "useWhen": [
    "2 to 6 groups share one scatter and hide each other",
    "readers want to compare one group with another, or see one alone",
    "the legend would otherwise sit far from the data"
  ],
  "avoidWhen": [
    "more than six groups (fold the rest into Other, or use small multiples)",
    "one group is the whole story (just highlight it)",
    "readers will print or screenshot the chart"
  ],
  "fields": [
    {
      "name": "methods",
      "type": "category",
      "description": "the groups, in colour order (any names; past six share the resting colour)"
    },
    {
      "name": "cols",
      "type": "text",
      "description": "optional: the row columns' names; the x and y names title the axes when hints.xTitle and yTitle are absent",
      "optional": true
    },
    {
      "name": "rows",
      "type": "text",
      "description": "one point per row: [name, group index, x value (log scale, above zero), y value (log scale, above zero), optional year]; in the example a planet: orbital period in days, mass in Earth masses, discovery year"
    }
  ],
  "hints": {
    "xTitle": "days to go once round its star",
    "yTitle": "mass, Earths",
    "xUnit": "days",
    "yUnit": "Earth masses",
    "noun": "planets",
    "groupWord": "method",
    "groupPrefix": "found by ",
    "references": [
      {
        "name": "Earth",
        "x": 365.2,
        "y": 1
      },
      {
        "name": "Jupiter",
        "x": 4331,
        "y": 318
      }
    ]
  },
  "interactive": [
    "filter"
  ],
  "interactions": [
    "click a chip to take that method in or out",
    "hover or tap a dot to read the planet",
    "Play shows one method at a time"
  ],
  "motion": "Methods arrive one after another, the crowded transit cloud first and the rare imaging finds last; filtered dots shrink away and grow back.",
  "sound": "A pop on every chip; a pop on hover pitched by method. Quiet while it draws; mute it from its card.",
  "tags": [
    "filter",
    "legend",
    "chips",
    "toggle",
    "groups",
    "space",
    "exoplanets",
    "astronomy"
  ],
  "mobile": "desktop",
  "mobileNote": "On a phone marks are too small to see or tap (checked by eye)",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "9:16"
  ],
  "bestRatio": "9:16",
  "source": {
    "title": "Planetary Systems Composite Parameters (pl_orbper, pl_bmasse, discoverymethod)",
    "publisher": "NASA Exoplanet Archive, NASA Exoplanet Science Institute (Caltech/IPAC)",
    "url": "https://exoplanetarchive.ipac.caltech.edu/docs/API_PS_columns.html",
    "license": "Public (NASA; acknowledgement requested)",
    "retrieved": "2026-12-01"
  },
  "note": "Only planets whose mass is measured (true mass or minimum mass, M sin i), not estimated from radius. Median orbit: 5.4 days for transit planets, 308 days for radial-velocity planets. Earth and Jupiter markers use NASA's Planetary Fact Sheet."
}