Skip to main content

Ridgeline chart

info

Charts are available with Avalonia Pro.

Ridgeline charts stack multiple area distributions with vertical overlap so you can compare shape changes across groups, periods, or scenarios.

When to use

  • Distribution over time: Compare how a distribution shifts from one period to another.
  • Group comparison: Stack many related density-like curves in one compact frame.
  • Shape-first analysis: Emphasize contour and overlap more than exact totals.

Code example

XAML

<charts:RidgelineChart Title="Distribution over time" Height="360">
<charts:RidgelineChart.Series>
<charts:AreaSeries Title="2023" ItemsSource="{Binding Series2023}" CategoryPath="X" ValuePath="Y" />
<charts:AreaSeries Title="2024" ItemsSource="{Binding Series2024}" CategoryPath="X" ValuePath="Y" />
</charts:RidgelineChart.Series>
</charts:RidgelineChart>

Data model (C#)

public record CurvePoint(double X, double Y);

public ObservableCollection<CurvePoint> Series2023 { get; } = new() { new(0, 4), new(1, 8), new(2, 5) };
public ObservableCollection<CurvePoint> Series2024 { get; } = new() { new(0, 3), new(1, 9), new(2, 6) };

Common properties

PropertyDescriptionDefault
SeriesContent collection of AreaSeries distributions.Empty collection
OverlapOverlap factor between series.0.5
SeriesHeightTarget height for each series band.50.0
CurveTypeCurve interpolation type.Spline

See also