Area Chart in C#
Create filled area charts in C# with AddArea — gradient and opacity control, stacking, self-contained SVG output. Zero-dependency .NET charting library.
Area Chart
Filled area chart showing daily active users over 10 days.
When to use a area chart
Reach for it when
- A single series where the magnitude under the curve is part of the story — cumulative volume, total usage.
- Stacked composition over time, when the total and its parts both matter.
- A baseline of zero that is meaningful. The fill is a claim about the distance to zero.
Use something else when
- Overlapping unstacked series beyond two or three — the fills occlude one another even at reduced opacity.
- An axis that does not start at zero. The filled region then exaggerates a small difference into a large block of colour.
- Comparing precise values between stacked bands; only the bottom band sits on a flat baseline, so the rest are hard to read.
Area 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("Daily Active Users")
.Size(700, 420)
.XAxis("Day", "Mon","Tue","Wed","Thu","Fri","Sat","Sun")
.YAxis("Users", min: 0)
.AsAnimated()
.Series(s => s
.AddArea("Active Users",
new double[] { 4200, 5100, 4800, 6300, 7200, 3800, 2900 },
cfg => cfg.Color(ChartColor.ChartBlue).FillOpacity(0.3)))
.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.