TerraFluent.Chart.Reporting

Parliament Chart in C#

Render parliament seating charts in C# with AddParliament and ParliamentGroup — one dot per seat, grouped by party, as self-contained SVG.

Parliament Chart

AddParliament() — semicircular hemicycle seating diagram.

Parliament of Westoria — 14th Session — 300 seats · distribution after general election Parliament of Westoria — 14th Session — 300 seats · distribution after general election — Series: Parliament of Westoria. Parliament of Westoria — 14th Session 300 seats · distribution after general election 112 98 52 24 14 300 seats total Progressive Alliance (112) Conservative Union (98) Centrist Democrats (52) Green Coalition (24) Liberty Movement (14) terrafluent.dev terrafluent.dev

When to use a parliament chart

Reach for it when

  • Election results and assembly composition, where the count of seats is discrete and countable.
  • Any whole made of individually meaningful units — committee seats, allocated slots.
  • Showing whether a group reaches a threshold such as a majority; the arc makes the halfway point visible.

Use something else when

  • Continuous proportions. If the units are not countable seats, a pie or bar chart is more honest.
  • Very large assemblies at small render sizes, where individual dots merge.
  • Comparing two compositions side by side; the arcs are harder to compare than paired bars.

Parliament 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.

using TerraFluent.Chart.Reporting.Models;

string svg = ChartBuilder.Create()
    .Title("Parliament Composition (200 seats)")
    .Size(640, 400)
    .AsAnimated()
    .Series(s => s
        .AddParliament("Seats", new[]
        {
            new ParliamentGroup("Progressive", ChartColor.ChartBlue,   82),
            new ParliamentGroup("Conservative", ChartColor.ChartRed,   74),
            new ParliamentGroup("Green",        ChartColor.ChartGreen,  26),
            new ParliamentGroup("Independent",  ChartColor.Charcoal,    18),
        }))
    .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.