Skip to main content

Beeswarm plot chart

info

Charts are available with Avalonia Pro.

Beeswarm plots arrange points within each category to avoid overlap while preserving the distribution of individual observations.

When to use

  • Raw observation display: Show every point instead of only summary statistics.
  • Category comparison: Compare spread and clustering across groups.
  • Distribution detail: Reveal dense stacks that a plain scatter plot would hide.

Code example

XAML

<charts:BeeswarmPlotChart Title="Test scores by group"
Height="300"
ItemsSource="{Binding BeeswarmData}"
CategoryPath="Category"
ValuePath="Value" />

Data model (C#)

public record BeeswarmPoint(string Category, double Value);

public ObservableCollection<BeeswarmPoint> BeeswarmData { get; } = new()
{
new("A", 62),
new("A", 65),
new("B", 74),
new("B", 79)
};

Common properties

PropertyDescriptionDefault
ItemsSourceCollection of observations.null
CategoryPathPath to the grouping category.null
ValuePathPath to the numeric value.null
PointRadiusRadius of each point.5.0
FillBrush used to fill points.null
StrokeBrush used for point outlines.null
StrokeThicknessThickness of point outlines.1.0
ShowCategoryLabelsWhether to draw category labels.true
ShowAxesWhether to draw the value axis.true

See also