Skip to content
Alea0.1
Pro
  1. Alea
  2. Components
  3. Charts
  4. WaterfallChart

ChartsAlea Pro

WaterfallChart

How a starting amount becomes a final one: each change rises or falls from the running total, and totals stand on the floor.

import { WaterfallChart } from '@alea/pro';

Examples

Profit bridge

What added and what took away, from the starting amount to the total.

From revenue to profit
$0k$200k$400k$600kRevenueRefundsCostsAdsOtherProfit

Tokens

The design tokens this component reads, with their value in the current theme. Override any of them to restyle it.

Color

  • --alea-border…
  • --alea-border-control…
  • --alea-focus…
  • --alea-text-muted…

Type

  • --alea-font-family-body…

Motion

  • --alea-motion-duration-fast…
  • --alea-motion-duration-slower…
  • --alea-motion-spring…

Props

WaterfallChart props

How a starting amount becomes a final one: what added and what took away (profit bridges, budget changes).

PropTypeDefaultDescription
datarequired{ label: string; value: number; isTotal?: boolean | undefined; }[]-Steps: a change (positive or negative), or a total bar (isTotal) that shows the running sum.
classNamestring-Extra class names for the root element.
descriptionReactNode-One sentence on what the data shows; read before the chart.
heightnumber280Height in px. Default 280.
isLoadingboolean-Shows a shimmering placeholder while data loads.
showTablebooleantrueShows the table toggle. Default true.
titleReactNode-The title shown above it and read by screen readers.
valueFormat((v: number) => string)-Formats values (axis, tooltip, table).

Specs

Generated from the source: the variants in the types, the states and tokens in the CSS, and the motion patterns that apply. The grids render the real component in both themes; the numbers are measured from the page.

States
Keyboard focus
Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-chart-svgwrap.alea-chart-svg.alea-chart-grid.alea-chart-axis.alea-chart-bargroup.alea-chart-bar.alea-chart-cross
Data attributes
data-dim

Accessibility

  • The chart is a figure named by its title and described by its description; the picture has a text summary.
  • Tab to the chart, then arrow keys move through the data and each value is announced; Escape leaves.
  • The table toggle shows the same data as a real table for everyone who can't use the picture.

Keyboard

KeyDoes
TabFocuses the chart
Left or Right arrowPrevious or next value
Home or EndFirst or last value
EscapeClears the selection

Do and don't

Do

  • Start and end with totals, and show the changes between them.
  • Keep rises and falls in the success and danger tones, and say it in the labels too.

Don't

  • Don't use it for values that don't add up from one to the next.
Tested with axe, keyboard and screen reader roles