Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxSankey.SortOrder Property

Specifies the sort order of Sankey nodes in corresponding columns.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public Dictionary<string, int> SortOrder { get; set; }

#Property Value

Type Description
Dictionary<String, Int32>

A collection of nodes and their weights.

#Remarks

The Sankey component arranges nodes in columns based on node weights: the heavier the weight, the lower the node appears in the corresponding column. The default weight of all Sankey nodes is 1 – the component displays nodes in the order they are declared in the data source.

The Sankey component allows you to change the default node arrangement: assign a collection of nodes and their new weights to the SortOrder property.

DxSankey - Custom Node Sorting

<DxSankey Data="@Data"
          Width="100%"
          Height="440px"
          SortOrder="@SortOrder"
          SourceFieldName="Source"
          TargetFieldName="Target"
          WeightFieldName="Weight">
   @* ... *@
</DxSankey>

@code {
    IEnumerable<SankeyDataPoint> Data = Enumerable.Empty<SankeyDataPoint>();
    protected override void OnInitialized() {
        Data = GenerateData();
    }
    Dictionary<string, int> SortOrder = new Dictionary<string, int>() {
        { "Spain", 3 },
        { "France", 2 },
        { "New Zealand", 3 }
    };
}
See Also