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.GetAllNodesAsync() Method

Returns all DxSankey nodes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public ValueTask<IEnumerable<SankeyNodeInfo>> GetAllNodesAsync()

#Returns

Type Description
ValueTask<IEnumerable<SankeyNodeInfo>>

A structure that stores an awaitable result of an asynchronous operation. The awaitable result is a collection of Sankey nodes.

#Remarks

The following code snippet retrieves information about all Sankey nodes and links, and displays their number on a custom button click:

DxSankey - Display Information About Nodes and Links

<DxSankey Data="@Data"
          Width="100%"
          Height="440px"
          @ref=@Sankey
          SourceFieldName="Source"
          TargetFieldName="Target"
          WeightFieldName="Weight">
    <DxSankeyNodeSettings Width="8" Spacing="30" />
    <DxSankeyLinkSettings ColorMode="SankeyLinkColorMode.Gradient" />
    <DxTitleSettings Text="Commodity Turnover" />
</DxSankey>

<DxButton Text="Count nodes and links" Click="@CountNodesAndLinks" />

@Message

@code {
    IEnumerable<SankeyDataPoint> Data = Enumerable.Empty<SankeyDataPoint>();
    protected override void OnInitialized() {
        Data = GenerateData();
    }

    DxSankey Sankey;
    string Message { get; set; }
    async Task CountNodesAndLinks() {
        var nodes = await Sankey.GetAllNodesAsync();
        var links = await Sankey.GetAllLinksAsync();
        Message = "The Sankey component contains " + nodes.Count() + " nodes and " +
                  links.Count() + " links.";
    }
}
See Also