TerraFluent.Chart.Reporting

Stream Graph in C#

Render stream graphs and ThemeRiver charts in C# with AddStream — stacked bands around a centred baseline, as self-contained SVG. Zero dependencies.

Stream Graph (ThemeRiver)

AddStream() — stacked areas with a centered wiggle baseline.

Website Traffic by Channel — AddStream() — ThemeRiver wiggle baseline Website Traffic by Channel — AddStream() — ThemeRiver wiggle baseline — Series: Organic, Paid, Referral, Direct. Categories: Jan to Aug. Values range from 45 to 225. Website Traffic by Channel AddStream() — ThemeRiver wiggle baseline Organic Paid Referral Direct terrafluent.dev terrafluent.dev

When to use a stream graph

Reach for it when

  • Composition evolving over many time steps, where the overall silhouette tells the story.
  • Many series — a stream graph tolerates more bands than a stacked area chart before it fails.
  • Presentation and editorial contexts, where the organic shape is the point.

Use something else when

  • Reading exact values. No band sits on a flat baseline, so every one is judged by thickness alone.
  • Few time steps; with five points it is a lumpy stacked area chart.
  • Analytical work where the total must be read off the chart — the centred baseline hides it.

Stream Graph 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("Genre Popularity Over Time")
    .Size(720, 420)
    .XAxis("Year", "2019","2020","2021","2022","2023","2024")
    .AsAnimated()
    .Series(s => s
        .AddStream("Pop",     new double[] { 40, 45, 52, 60, 58, 64 })
        .AddStream("Rock",    new double[] { 55, 50, 48, 44, 42, 40 })
        .AddStream("Hip-Hop", new double[] { 30, 38, 47, 55, 62, 70 })
        .AddStream("Jazz",    new double[] { 18, 17, 16, 16, 15, 15 }))
    .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.