{
  "id": "chart-or-table",
  "name": "Chart or table",
  "family": "compare",
  "tier": "pro",
  "summary": "Use a chart-or-table switch when some readers want the shape and others want the exact numbers: one toggle, the same rows, the same order.",
  "title": "The US and China tied on 40 golds at Paris 2024; the US won 35 more medals in all",
  "subtitle": "Gold, silver and bronze medals won at the Paris 2024 Olympic Games, top 15 by golds",
  "howToRead": "Each bar stacks one team's gold, silver and bronze; switch to Table for the exact counts, and sort either view by golds or total.",
  "useWhen": [
    "readers need both the pattern and the precise values",
    "the chart will be read by screen readers or copied into reports",
    "a few readers will look up one row"
  ],
  "avoidWhen": [
    "there are hundreds of rows (use a searchable table)",
    "the values are all close and the chart says nothing a table doesn't",
    "space allows both at once (show both)",
    "more than six series (the tail folds into Other)"
  ],
  "fields": [
    {
      "name": "code",
      "type": "id",
      "description": "a short unique code for the row (the IOC country code)"
    },
    {
      "name": "country",
      "type": "category",
      "description": "the row's name (the team)"
    },
    {
      "name": "gold",
      "series": true,
      "type": "number",
      "sign": "non-negative",
      "description": "one stacked segment and table column per number key, in the data's order; 1 to 6 series (more fold into Other), any names. Here: gold medals",
      "unit": "medals",
      "format": "count"
    },
    {
      "name": "silver",
      "series": true,
      "type": "number",
      "sign": "non-negative",
      "description": "silver medals",
      "unit": "medals",
      "format": "count"
    },
    {
      "name": "bronze",
      "series": true,
      "type": "number",
      "sign": "non-negative",
      "description": "bronze medals",
      "unit": "medals",
      "format": "count"
    }
  ],
  "hints": {
    "item": "Team"
  },
  "interactive": [
    "sort"
  ],
  "interactions": [
    "Chart and Table switch the view",
    "Sort by the first series or by total reorders both views",
    "hover or tap a segment or a row to read it"
  ],
  "motion": "Bars grow from the left; switching view slides one out and the other in, and a re-sort moves each row to its new place.",
  "sound": "A chime on switching; a whoosh on re-sorting; a pop on hover. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "35 more medals",
      "in": "title"
    }
  ],
  "tags": [
    "table",
    "accessible",
    "toggle",
    "stacked bars",
    "olympics",
    "sport",
    "medals"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9"
  ],
  "bestRatio": "16:9",
  "source": {
    "title": "2024 Summer Olympics medal table",
    "publisher": "Wikipedia (from the International Olympic Committee's official medal table)",
    "url": "https://en.wikipedia.org/wiki/2024_Summer_Olympics_medal_table",
    "license": "CC BY-SA 4.0",
    "retrieved": "2026-12-01"
  }
}