Skip to main content

Bump chart

info

Charts are available with Avalonia Pro.

Bump charts are a variation of line charts designed to visualize changes in rank over time. They focus on the relative position of categories rather than their absolute values.

Bump chart showing rank changes over time with smooth curved lines connecting each entity's position across periods.

When to use

  • Popularity rankings: Showing how songs or movies move up and down a top-10 list.
  • Market share: Visualizing the competition between brands for the top spot.
  • Tournament standings: Tracking the relative performance of teams across stages.

Code example

XAML

<charts:BumpChart Name="BumpChartSample"
Title="Ranking Changes"
Height="300"
NamePath="Name"
RankingsPath="Ranks"
Periods="{Binding BumpPeriods}"
ItemsSource="{Binding BumpData}" />

Data model (C#)

public record BumpItem(string Name, int[] Ranks);

public ObservableCollection<BumpItem> BumpData { get; } = new()
{
new("Java", new[] { 1, 2, 2, 3, 3 }),
new("C#", new[] { 4, 3, 3, 2, 2 }),
new("Python", new[] { 2, 1, 1, 1, 1 }),
new("JS", new[] { 3, 4, 4, 4, 4 })
};

public ObservableCollection<string> BumpPeriods { get; } = new()
{
"2020", "2021", "2022", "2023", "2024"
};

Common properties

PropertyDescriptionDefault
ItemsSourceThe collection of ranked entities.null
NamePathProperty representing the entity name.null
RankingsPathProperty representing the rank sequence for each entity.null
PeriodsLabels displayed across the horizontal axis.null
StrokeThicknessWidth of the ranking lines.3.0
MarkerSizeSize of the markers drawn at each period.10.0
ShowLabelsWhether to display entity labels at the end of each line.true
ShowRankNumbersWhether to display rank numbers on the vertical axis.true