Skip to main content

Organization chart

info

Charts are available with Avalonia Pro.

Organization charts represent the structure of an organization, clarifying reporting relationships, relative ranks, and positions/job roles.

Organization chart with a top-level CEO node branching down to department heads showing reporting relationships.

When to use

  • Company directory: Visualizing the reporting structure of a business.
  • Project hierarchy: Mapping out product owners, developers, and stakeholders.
  • Family trees: Displaying genealogical relationships and lineages.

Code example

XAML

<charts:OrganizationChart Name="OrganizationChartSample" Title="Company Structure" Height="350"
ItemsSource="{Binding OrgChartData}" LabelPath="Name" ChildrenPath="Reports" />

Data model (C#)

public class OrgNode
{
public string Name { get; set; } = string.Empty;
public string Position { get; set; } = string.Empty;
public ObservableCollection<OrgNode> Reports { get; set; } = new();
}

public ObservableCollection<OrgNode> OrgChartData { get; } = new()
{
new OrgNode { Name = "CEO", Reports = {
new OrgNode { Name = "CTO", Reports = {
new OrgNode { Name = "Dev Lead" }
}},
new OrgNode { Name = "CFO", Reports = {
new OrgNode { Name = "Accounting" }
}}
}}
};

Common properties

PropertyDescriptionDefault
ItemsSourceThe hierarchical data source (root nodes).null
LabelPathProperty name for the node labels.null
ChildrenPathPath to the collection of child nodes.null
OrientationHorizontal or Vertical layout.Vertical
NodeWidthWidth of each node box.120.0
NodeHeightHeight of each node box.50.0
NodeGapGap between levels and sibling nodes.30.0