Skip to main content
All docs
V24.2

DxSankey.GetAllNodesAsync() Method

Returns all DxSankey nodes.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

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