Skip to main content

Venn diagram chart

info

Charts are available with Avalonia Pro.

Venn diagram charts show how sets overlap, which regions are unique, and how much value belongs to each intersection.

When to use

  • Set comparison: Show overlap between product audiences, features, or experiments.
  • Shared membership: Highlight unique and intersecting segments.
  • Selection workflows: Let users inspect or select regions in the diagram.

Code example

XAML

<charts:VennDiagramChart Title="Audience overlap"
Height="320"
ItemsSource="{Binding VennItems}"
IsSelectionEnabled="True" />

Data model (C#)

public ObservableCollection<VennItem> VennItems { get; } = new()
{
new() { Name = "Newsletter", Sets = ["A"], Value = 45 },
new() { Name = "Webinars", Sets = ["B"], Value = 30 },
new() { Name = "Customers", Sets = ["A", "B"], Value = 18 }
};

Common properties (VennDiagramChart)

PropertyDescriptionDefault
ItemsSourceCollection of VennItem regions.null
IsSelectionEnabledWhether regions can be selected.false
SelectionModeSelection behavior.SingleDeselect
SelectionBrushBrush used for selected regions.Theme-dependent
SelectionStrokeStroke used for selected regions.null
SelectionStrokeThicknessStroke thickness used for selected regions.2.0
SelectedIndexIndex of the selected region, or -1 when nothing is selected.-1

Common properties (VennItem)

PropertyDescriptionDefault
SetsCollection of set identifiers, such as ["A"] or ["A", "B"].Empty collection
ValueNumeric value represented by the set or intersection.0.0
NameOptional region label.null
FillOptional fill brush for the region.null

See also