SankeyDiagramControl.NodeComparer Property
Gets or sets an algorithm that sorts nodes.
Namespace: DevExpress.Xpf.Charts.Sankey
Assembly: DevExpress.Xpf.Charts.v24.2.dll
NuGet Package: DevExpress.Wpf.Charts
Declaration
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