Waterfall chart
Show how a starting value evolves through a sequence of positive / negative contributions to a final value — revenue waterfall (revenue → costs → margin), budget decomposition, P&L bridges.
The demo decomposes the Apollo program's $25.4 B lifetime cost (1973 closeout, in 1973 dollars) by the four big spending buckets: the Saturn V rocket family, the Apollo CSM + Lunar Module spacecraft, ground operations + tracking, and the rest of the R&D portfolio. Saturn V alone — Wernher von Braun's moon rocket — was 36 % of the program total.
Source: Apollo program — Costs — Wikipedia
Public surface
use wisp_chart::finance::{Waterfall, WaterfallRow};
let w = Waterfall::new(vec![
WaterfallRow::summary("Start", 100.0),
WaterfallRow::contribution("Revenue", 80.0),
WaterfallRow::contribution("COGS", -30.0),
WaterfallRow::contribution("Opex", -25.0),
WaterfallRow::contribution("Tax", -10.0),
WaterfallRow::summary("End", 115.0),
]);
Row kinds
| Constructor | Visual |
|---|---|
WaterfallRow::summary(label, v) | Full-height bar from 0 to v — typically Start / End totals |
WaterfallRow::contribution(label, d) | Floating bar sitting on the running total, length |d|, coloured by sign |