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

GaugeBase.Exported Event

In This Article

Fires after the gauge is exported.

Namespace: DevExpress.Blazor.Base

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 gauge component exports its data:

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

Razor
@inject IJSRuntime JSRuntime

<DxBarGauge Width="100%"
            Height="500px"
            @ref="@BarGauge"
            Exported="@OnExported"
            StartValue="-5"
            EndValue="5"
            BaseValue="0"
            Values="@Values">
    @* ...*@
</DxBarGauge>

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

@code {
    DxBarGauge BarGauge;
    string fileName = "Custom PDF";

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

    double[] Values = new double[] { -2.13, 1.48, -3.09, 4.52, 4.9, 3.9 };
    // ...
}
See Also