TerraFluent.Chart.Reporting

Waterfall Chart in C#

Build waterfall and bridge charts in C# with AddWaterfall — running totals, absolute total bars, rendered as self-contained SVG. MIT licensed .NET library.

Waterfall Chart

ChartType.Waterfall — incremental running-total chart.

Annual Cash Flow Analysis — Waterfall — cumulative P&L Annual Cash Flow Analysis — Waterfall — cumulative P&L — Series: P&L. Categories: Opening to Net Profit. Values range from -450 to 980. Annual Cash Flow Analysis Waterfall — cumulative P&L -400 -200 0 200 400 600 800 USD ($k) Opening Revenue COGS Gross Profit OpEx EBITDA Tax Net Profit P&L: 500 P&L: 800 P&L: -320 P&L: 980 P&L: -450 P&L: 530 P&L: -120 P&L: 410 P&L terrafluent.dev terrafluent.dev

When to use a waterfall chart

Reach for it when

  • Showing how a starting figure becomes an ending figure through named contributions — P&L bridges, variance analysis.
  • Headcount, inventory, or cash movement where additions and subtractions both matter.
  • Any narrative of the form "we started here, these things happened, we ended here".

Use something else when

  • Contributions that do not actually sum to the end value. The chart asserts they do.
  • More than about ten steps — the running baseline gets hard to follow.
  • Unordered categories. The sequence is the chart's argument, so it must be meaningful.

Waterfall Chart in C#

Lifted verbatim from the chart types reference, so it compiles against the shipped API. See the API reference for every overload and the exact data types each series method accepts.

string svg = ChartBuilder.Create()
    .Title("Annual Cash Flow Analysis")
    .Size(720, 440)
    .XAxis(x => x.Categories.AddRange(new[]
        { "Opening","Revenue","COGS","Gross Profit","OpEx","EBITDA","Tax","Net Profit" }))
    .YAxis(y => y.Title = "USD ($k)")
    .AsAnimated()
    .Series(s => s
        .AddWaterfall(
            name:   "P&L",
            data:   new double?[] { 500, 800, -320, 980, -450, 530, -120, 410 },
            totals: new[] { true, false, false, true, false, true, false, true }))
    .RenderToSvg();

Install

dotnet add package TerraFluent.Chart.Reporting
  • MIT licensed — free for commercial use, no chart limits, no watermarks.
  • Zero dependencies — nothing but the .NET base class library.
  • netstandard2.0 through net10.0 — .NET Framework 4.6.1+, .NET Core 2.0+, and every modern release.
  • Output is one SVG string — embed it in HTML, a PDF, or a Word document.