{
  "id": "grouped-bars",
  "name": "Grouped bars",
  "family": "compare",
  "tier": "free",
  "summary": "Use grouped bars to compare two to four series within each item, side by side on one baseline.",
  "title": "China made more solar power in 2024 than the US, India and Germany combined",
  "subtitle": "Electricity generated from solar, wind and hydro, terawatt-hours (TWh), 2024",
  "howToRead": "Each group is a country and each colour a source; turn sources on or off with the chips below.",
  "useWhen": [
    "2 to 4 series measured in the same unit for each item",
    "comparing within each item matters as much as across items",
    "up to about 8 items"
  ],
  "avoidWhen": [
    "the series add up to a meaningful total (use stacked bars)",
    "more than four series (use small multiples)",
    "many items, which makes the groups unreadable"
  ],
  "fields": [
    {
      "name": "country",
      "type": "category",
      "description": "the group (a country here); hints.short can shorten long names under the bars"
    },
    {
      "name": "solar",
      "series": true,
      "type": "number",
      "sign": "non-negative",
      "description": "one bar in every group per number key, in the data's order; 2 to 4 series read best, up to 6 drawn (the rest are named in a note), any names. Here: solar electricity, TWh",
      "unit": "TWh",
      "format": "count"
    },
    {
      "name": "wind",
      "series": true,
      "type": "number",
      "sign": "non-negative",
      "description": "wind electricity, TWh",
      "unit": "TWh",
      "format": "count"
    },
    {
      "name": "hydro",
      "series": true,
      "type": "number",
      "sign": "non-negative",
      "description": "hydroelectricity, TWh",
      "unit": "TWh",
      "format": "count"
    }
  ],
  "hints": {
    "short": {
      "United States": "US"
    }
  },
  "interactive": [
    "filter"
  ],
  "interactions": [
    "hover or tap a bar to read its value and share",
    "a chip per series (Solar, Wind, Hydro) toggles it and rescales the axis"
  ],
  "motion": "Bars rise country by country; toggling a source slides the others to fill the gap and rescales smoothly.",
  "sound": "A chime on each toggle; a pop on hover. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "more solar power",
      "in": "title",
      "ink": 0
    }
  ],
  "tags": [
    "grouped bars",
    "clustered bars",
    "energy",
    "solar",
    "wind",
    "hydro",
    "electricity"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9"
  ],
  "bestRatio": "16:9",
  "source": {
    "title": "Energy dataset (solar_electricity, wind_electricity, hydro_electricity), from Ember and the Energy Institute",
    "publisher": "Our World in Data",
    "url": "https://github.com/owid/energy-data",
    "license": "CC BY 4.0",
    "retrieved": "2026-12-01"
  }
}