Waterfall charts show how sequential positive or negative values contribute to a running total. Each bar starts where the previous one ended.
This example uses range values ([low, high] arrays) on a Bar component and a custom shape to color bars based on whether they represent gains, losses, or totals.
The computeWaterfallData helper function is defined inline to transform raw data into the range format that Recharts expects.