Skip to content
← Visualization

Stacked bar

Segments divide each bar into its component amounts.

How people reach the library

How people reach the library: stacked bar. Visits. Full values follow in the data view.9 observations. Use the data view for exact values.0306090120VisitsNorth453025Harbor243660West421830WalkCycleTransit
Illustrative data
View data9 records
How people reach the library
ItemGroupVisits
NorthWalk45
NorthCycle30
NorthTransit25
HarborWalk24
HarborCycle36
HarborTransit60
WestWalk42
WestCycle18
WestTransit30

When it fits

Compare totals and the composition of each total.

What you need

Nonnegative components that add to a meaningful whole.

Watch for

Middle segments lack a shared baseline, which makes close comparisons difficult.

In practice

Weather conditions by month, published by Vega-Lite contributors.
Weather conditions by month · Vega-Lite contributors · BSD-3-Clause
Sources and accessibility

The authored example uses illustrative data. Published references retain their original information and presentation.

Use Tab to reach controls and the data view. Native selects support arrow keys. All values are available in the data view; color and hover are never the only way to read the example.