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
Sample data: weekly inflow and outflow, W29 to W40, on a ±400K axis
- 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
- Layer
- out 1
- Type
- Rectangle
- Size
- 37 × 50
- Fill
- data/cat-2
- Group
- Marks · 24
Layers
004 / Diverging bars
- Layer
- out 1
- Type
- Rectangle
- Size
- 19 × 31
- Fill
- data/cat-2
- Group
- Marks · 24
Layers
004 / Diverging bars
- 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.
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
npx shadcn add @chartory/diverging-barsimport { 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.
EmberPreset
ChartoryDefault preset
Pick the blocks, the size and the preset for your own widget.
Read the Hearth widget docsFAQ
Diverging bar questions.
What people ask before they put diverging bars in a dashboard.
Something else?
hello@usechartory.comInflow 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.
The net is the difference between the two bars in a week. When the net is the main number, a waterfall walks it from one total to the next.
One data object in the sample’s shape: a positive and a negative value per period. The docs page lists every field and links its JSON Schema; the sample data comes with the component, so you can start from it and swap in your own.
Series take the preset’s data colours in order, and states such as up, down or warning take its status colours. Change the preset in Figma or in code to recolour every chart at once.
XS, S, M and L, in light and dark. Each size is laid out again from the data, so text and lines keep their size.
Yes. It plays in when it scrolls into view, and when the data changes every mark moves from its old place to its new one. With reduced motion on, it does not move.
Yes. The React component is free in the public registry in Hearth, no token needed; Signal comes with Code and Complete. The Figma component comes with Figma and Complete.
Ask for it by name. The MCP server tells the agent what data it needs and runs the same command: npx shadcn add @chartory/diverging-bars. You review the diff.
Related types
Other ways to show compare items.
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.