Toucan AI Docs

Stacked bar chart

Configure a stacked bar chart in Toucan AI to show part-to-whole breakdowns.

Target Audience: Non-technical users and builders configuring charts in the Library.

Stacked bar chart example

Overview

A stacked bar chart shows how a total splits into segments within each category. Bar category defines each bar; Bar segment defines stack layers; Bar height sets segment size.

  • Dimension: Bar category and Orientation (vertical or horizontal).
  • Measure: Bar segment (required) and Bar height with optional Aggregation.

In the Library, enable Manual Edit, set Type to Stacked bars, and map columns under Data.

Shared fields (Title, Narrative, Data) are in Chart types.

When to use it

Good fit

  • Part-to-whole within each category (revenue by month split by product line).
  • Compare segment mix across teams, regions, or periods.
  • Survey or funnel answers stacked per question.

Prefer another chart

Examples: revenue by month and product line, headcount by team and contract type.

Limit Bar segment to a modest number of categories so stacks stay readable.

Common setups

  • Vertical stacks: Bar category + Bar segment + Bar height (e.g. Sum).
  • Over time: date Bar category + Date granularity + segment column.
  • Horizontal: set Orientation to Horizontal, then same fields.

Configuration options

Open the chart in the Library, turn on Manual Edit, select Data, then set Type to Stacked bars. Panels: Dimension and Measure (More dimension options / More measure options).

Prerequisites: connected database, Manual Edit (how-to).

Dimension

OptionHow it works
OrientationVertical (default) or Horizontal stacked layout.
Bar categoryColumn for each bar (category or time axis).
Date granularityOnly shown when Bar category is a date column. Year, Quarter, Month, Week, or Day.
Date formatHow date labels appear on the category axis.
Order barsMore dimension options. Sort by a column, ascending or descending.
Show all labelsMore dimension options. Label under each bar.

Measure

OptionHow it works
Bar segmentColumn whose values become stack segments (e.g. status, product type).
Bar heightColumn for segment size. Often numeric; use Aggregation as needed.
AggregationOn Bar height after the column is selected.
Format numberShown when Bar height is numeric (after aggregation).
Show value on barMore measure options. Values on segments (on by default).
Automatic y-axis scalingMore measure options. On by default; off for Min / Max.

Aggregations on Bar height

AggregationTypical column types
Sum, Cumulated sum, AverageInteger, float
Minimum, MaximumInteger, float, date
Count rows, Count distinctAll types
Standard deviationInteger, float

The AI assistant can pre-fill these fields; use Manual Edit to adjust.

Suggested next steps: Chart types · Bar chart · Customize a chart manually · Create a chart with AI

On this page