Skip to main content

Parliament chart

info

Charts are available with Avalonia Pro.

Parliament charts arrange seats in a semicircle so party representation can be read as both totals and spatial balance.

When to use

  • Legislative composition: Show seat distribution by party or bloc.
  • Board representation: Visualize committee or council membership.
  • Proportional allocation: Present seat-based outcomes with a familiar hemicycle layout.

Code example

XAML

<charts:ParliamentChart Title="Parliament seats"
Height="320"
TotalSeats="120"
Parties="{Binding Parties}" />

Data model (C#)

public ObservableCollection<ParliamentParty> Parties { get; } = new()
{
new() { Name = "Alliance", Seats = 46, Color = Colors.SteelBlue },
new() { Name = "Coalition", Seats = 38, Color = Colors.OrangeRed },
new() { Name = "Green", Seats = 22, Color = Colors.ForestGreen },
new() { Name = "Independent", Seats = 14, Color = Colors.Gray }
};

Common properties

PropertyDescriptionDefault
TotalSeatsTotal number of seats to draw.100
RowsNumber of concentric seat rows.4
InnerRadiusFactorInner radius factor for the hemicycle.0.4
SeatGapGap between seats.2.0
StartAngleStart angle in degrees for the left edge of the hemicycle.180.0
EndAngleEnd angle in degrees for the right edge of the hemicycle.0.0
PartiesCollection of ParliamentParty items that define seat allocation.null

Common properties (ParliamentParty)

PropertyDescriptionDefault
NameParty or bloc name.string.Empty
SeatsNumber of seats assigned to the party.0
ColorColor used to draw the party's seats.Gray

See also