Skip to content

Diverging bar chart

In and out, from one zero line.

Definition · Updated Nov 2, 2026

A diverging bar chart draws positive values up and negative values down from one zero line, so gains and losses per period read at once. Use it for inflow and outflow, net change and anything with two directions.

Pay once. Every update included.

Live preview

Net cash flowWeekly inflow (up) and outflow (down) in $K, W29 to W40: inflow totals $3,660K, outflow $2,790K, net $870K.400K0−400KW29W33W37W40INFLOWOUTFLOW
Net cash flow
WeekInflow ($K)Outflow ($K)
W29220180
W30260210
W31240230
W32300200
W33280240
W34330220
W35310260
W36290250
W37360230
W38340270
W39380240
W40350260

Sample data: weekly inflow and outflow, W29 to W40, on a ±400K axis

Size
Legend
Data shape
A positive and a negative value per period
Good for
Inflow and outflow, gains and losses
Avoid when
All values share one sign
Sizes
XS, S, M and L, re-laid out from the data

Anatomy

Inspect it like the Figma file.

The same layers, names and tokens as the component. Select one to read its size, fill and style.

Layers

004 / Diverging bars

chart/004-diverging-bars
plot · diverging columns
Layer
out 1
Type
Rectangle
Size
37 × 50
Fill
data/cat-2
Group
Marks · 24

Layers

004 / Diverging bars

chart/004-diverging-bars
plot · diverging columns
Layer
in 1
Type
Rectangle
Size
11 × 31
Fill
data/primary
Group
Marks · 24

Sizes

Re-laid out, never scaled.

The same data at XS, S, M and L. Every size is redrawn from the data, so text and line weights never shrink.

M against S

Width360 px480 px

Plot328 px440 px

Labels77

Marks2424

Height212 px246 px

Same tokens at every size: text styles, 1 px lines and mark radius stay put.

When to use

Two directions, one line.

Three signs it fits, and three signs another type fits better.

Do values go both ways?

All values are positive.

Yes: Keep the diverging bars

Is each period its own amount?

Steps from one total to another.

Yes: Keep the diverging bars

Does the size matter, not only the sign?

Only the sign over many periods.

Yes: Keep the diverging bars

Code and Figma

One name in Figma and in code.

Every Figma property is a prop with the same name and values. One command installs it.

Figma

chart/004-diverging-bars

size
legend
Property = propValuesDefault
size"xs" · "s" · "m" · "l""xs"
legendtrue · falsetrue
color"cat-1" · "cat-2" · "cat-3" · "cat-4""cat-1"
npx shadcn add @chartory/diverging-bars
diverging-bars.tsx
import { DivergingBars } from "@/components/chartory/diverging-bars"import { weeklyFlows } from "./weekly-flows"export function WeeklyFlows() {  return (    <DivergingBars      data={weeklyFlows}      size="m"      legend={true}    />  )}

Hearth widget

Diverging bars as a widget.

The chart in a Hearth card with a hero number and two blocks. One token set, light and dark.

Code
Get the code

EmberPreset

ChartoryDefault preset

Pick the blocks, the size and the preset for your own widget.

Read the Hearth widget docs

FAQ

Diverging bar questions.

What people ask before they put diverging bars in a dashboard.

Something else?

hello@usechartory.com
  • Inflow up from the zero line, outflow down, each in its own colour. The axis runs the same distance both ways (400K to −400K in the sample) so the sides compare fairly.

Related types

The same question, a different shape of answer. Every type ships in Figma and in code.

Same family

Compare items

Rank, gap and change between products, teams or regions.