Skip to main content

Flow chart

info

Charts are available with Avalonia Pro.

FlowChart renders nodes, edges, and optional groups for workflows, process maps, and decision trees. When nodes have no explicit positions, the control can lay them out automatically.

When to use

  • Process diagrams: Render step-by-step business or operational flows.
  • Decision trees: Show branches, outcomes, and labeled transitions.
  • System maps: Group related nodes into bounded areas.

Code example

XAML

<charts:FlowChart Title="Troubleshooting"
Height="360"
Nodes="{Binding FlowNodes}"
Edges="{Binding FlowEdges}" />

Data model (C#)

public ObservableCollection<FlowNode> FlowNodes { get; } = new()
{
new() { Id = "start", Text = "Lamp off", Shape = FlowShape.RoundedRect },
new() { Id = "power", Text = "Check power", Shape = FlowShape.Rectangle },
new() { Id = "done", Text = "Replace bulb", Shape = FlowShape.Diamond }
};

public ObservableCollection<FlowEdge> FlowEdges { get; } = new()
{
new() { SourceId = "start", TargetId = "power" },
new() { SourceId = "power", TargetId = "done", Label = "No" }
};

Common properties (FlowChart)

PropertyDescriptionDefault
NodesCollection of FlowNode items rendered by the chart.null
EdgesCollection of FlowEdge connections.null
GroupsOptional collection of FlowGroup containers.null
NodeCornerRadiusCorner radius applied to rounded node shapes.10.0

Common properties (FlowNode)

PropertyDescriptionDefault
IdUnique node identifier used by edges and groups.null
TextText displayed inside the node.null
ShapeNode shape, such as Rectangle or Diamond.Rectangle
XExplicit X position.0
YExplicit Y position.0
WidthNode width.120
HeightNode height.60
BackgroundOptional background brush for the node.null
ForegroundOptional text brush for the node.null
IconOptional icon shown inside the node.null

Common properties (FlowEdge)

PropertyDescriptionDefault
SourceIdSource node identifier.null
TargetIdTarget node identifier.null
LabelOptional edge label.null
ShowArrowWhether to draw the arrow head.true

Common properties (FlowGroup)

PropertyDescriptionDefault
IdUnique group identifier.null
LabelOptional label displayed for the group.null
BoundsExplicit bounds of the group container.0,0,0,0
BackgroundOptional background brush for the group.null
BorderBrushOptional border brush for the group.null
BorderThicknessThickness of the group border.1.0
NodeIdsCollection of node IDs that belong to the group.null

See also