Skip to main content

Mosaic chart

info

Charts are available with Avalonia Pro.

Mosaic charts (Marimekko) visualize relationships between categories using area. Both the width and height of segments are scaled to represent percentages of the total.

Mosaic chart with rectangular tiles scaled by both width and height to show proportions across two categorical variables.

When to use

  • Market segmentation: Showing sales by region (width) and by product category (height).
  • Resource expenditure: Visualizing budget allocation across departments and cost types.
  • Multi-factor analysis: Understanding how two different qualitative variables interact.

Code example

XAML

<charts:MosaicChart Title="Sales by Region" Height="300"
ItemsSource="{Binding MosaicData}"
GroupPath="Region"
SubGroupPath="Category"
ValuePath="Sales" />

Data model (C#)

public record MosaicItem(string Region, string Category, double Sales);

public ObservableCollection<MosaicItem> MosaicData { get; } = new()
{
new("North", "Electronics", 450),
new("North", "Clothing", 320),
new("North", "Home", 210),
new("South", "Electronics", 380),
new("South", "Clothing", 410),
new("South", "Home", 180),
new("East", "Electronics", 290),
new("East", "Clothing", 250),
new("East", "Home", 350),
new("West", "Clothing", 280),
new("West", "Home", 150)
};

Common properties

PropertyDescriptionDefault
ItemsSourceThe collection of data segments.null
GroupPathPrimary category (determines width).null
SubGroupPathSecondary category (determines height).null
ValuePathNumerical value for scaling.null