Skip to main content

Ternary chart

info

Charts are available with Avalonia Pro.

Ternary charts visualize three-component mixtures where each point represents the relative contribution of A, B, and C.

When to use

  • Mixture analysis: Show composition of blends, materials, or resource allocation.
  • Three-way balance: Compare proportions that always sum to a whole.
  • Scientific classification: Place samples within a triangular decision space.

Code example

XAML

<charts:TernaryChart Title="Mixture composition"
Height="320"
ItemsSource="{Binding TernaryData}"
APath="Sand"
BPath="Silt"
CPath="Clay"
ALabel="Sand"
BLabel="Silt"
CLabel="Clay" />

Data model (C#)

public record TernaryPoint(double Sand, double Silt, double Clay);

public ObservableCollection<TernaryPoint> TernaryData { get; } = new()
{
new(60, 25, 15),
new(35, 45, 20),
new(20, 30, 50)
};

Common properties

PropertyDescriptionDefault
ItemsSourceCollection of ternary points.null
APathPath to the first component value.null
BPathPath to the second component value.null
CPathPath to the third component value.null
ALabelLabel for axis A.null
BLabelLabel for axis B.null
CLabelLabel for axis C.null
ShowGridLinesWhether to draw the ternary grid.true
DotSizeRadius of the plotted points.5.0

See also