Skip to content

Split bar chart

Diverging vertical bar chart for values around a shared baseline (positive/negative).

bar-split plots values that radiate out from a shared baseline — positive and negative, gain and loss, opinion for and against. It uses signed values directly; no explicit "diverging" toggle is required.

When to use

  • Net change scenarios where some values are positive and some are negative (sentiment, election swing, year-on-year deltas)
  • Polling spreads and ranges around a central estimate
  • Comparing a small group of categories where direction is part of the story

When NOT to use

  • All-positive datasets — a regular bar-vertical reads more cleanly
  • When the absolute total is what matters, not the spread
  • Many categories with subtle differences — the diverging baseline amplifies noise

Example

bpc
chart bar-split {
  title = "Phoenix summers hit 37 °C while Chicago winters drop below zero"
  description = "Mean monthly temperature (°C), NOAA 30-year climate normals 1991–2020"
  source = "NOAA"
  sourceUrl = "https://www.ncei.noaa.gov/products/land-based-station/us-climate-normals"
  valueLabels = true

  data {
    _series = "Winter (Jan)","Spring (Apr)","Summer (Jul)"
    "Miami"       = 20,26,29
    "Los Angeles" = 14,17,23
    "Phoenix"     = 13,24,37
    "Seattle"     = 5,10,19
    "New York"    = 1,12,25
    "Chicago"     = -4,10,24
  }
}

Common pitfalls

  • Forgetting that the chart is encoding sign; readers should be able to tell what zero means without reading the axis label
  • Mixing categories that don't share the same scale or meaning around the baseline
  • Sorting that hides the diverging pattern — sort by net change, not by absolute value
  • bar-vertical — when all values share the same sign
  • bar-multi — when you need side-by-side comparison rather than divergence
  • bar-stacked — when the parts of each bar sum to a meaningful total

See also

Released under the MIT License. Built static-first — your data never leaves the page.