Skip to main content
All docs
V24.1

SankeyDiagramControl.NodeComparer Property

Gets or sets an algorithm that sorts nodes.

Namespace: DevExpress.Xpf.Charts.Sankey

Assembly: DevExpress.Xpf.Charts.v24.1.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

[Browsable(false)]
public IComparer<SankeyNode> NodeComparer { get; set; }

Property Value

Type Description
IComparer<SankeyNode>

An object of a class that implements the IComparer<SankeyNode> interface.

Remarks

The following code arranges nodes in descending order based on their TotalWeight values:

<dxsa:SankeyDiagramControl>
    <!--...-->
    <dxsa:SankeyDiagramControl.NodeComparer>
        <local:MyNodeComparer/>
    </dxsa:SankeyDiagramControl.NodeComparer>
    <!--...-->
</dxsa:SankeyDiagramControl>
using DevExpress.Xpf.Charts.Sankey;
//...
public class MyNodeComparer : IComparer<SankeyNode> {
    public int Compare(SankeyNode x, SankeyNode y) {
        return y.TotalWeight.CompareTo(x.TotalWeight);
    }
}
See Also