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.Exported Event

Fires after the Sankey is exported.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public EventCallback Exported { get; set; }

#Remarks

The Exported event fires after the Sankey component exports its data:

#Example

The following code snippet handles the Exported event to display information about the exported file:

@inject IJSRuntime JSRuntime

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

<DxButton Text="Export to PDF" Click="@ExportToPdf" />

@code {
    DxSankey Sankey;
    string fileName = "Custom PDF";

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

    async Task ExportToPdf() {
        await Sankey.ExportToAsync(fileName, DataExportFormat.Pdf);
    }
    async Task OnExported() {
        await JSRuntime.InvokeVoidAsync("alert", $"The Sankey is exported to the {fileName} file.");
    }
}
See Also