Skip to main content
All docs
V24.1

GaugeBase.Rendered Event

Fires after the gauge component is rendered.

Namespace: DevExpress.Blazor.Base

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public EventCallback Rendered { get; set; }

Remarks

Handle the Rendered event to track the moment when gauge rendering is finished and the component is completely loaded.

The following code snippet displays a custom Export to PDF button that exports bar gauge data to a PDF file. The button appears after the component is completely loaded. For demo purposes, the example imitates a time-consuming operation.

Bar Gauge - Export Data

<DxBarGauge Width="50%"
            Height="50%"
            StartValue="-5"
            EndValue="5"
            BaseValue="0"
            @ref=@BarGauge
            Values="@Values"
            Rendered="@BarGaugeRendered">
    @* ... *@
</DxBarGauge>

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

@code {
    bool buttonVisible;
    DxBarGauge BarGauge;

    async Task ExportToPdf () {
        await BarGauge.ExportToAsync("Custom file", DataExportFormat.Pdf);
    }

    async Task BarGaugeRendered() {
        await Task.Delay(2000);
        buttonVisible = true;
    }
    double[] Values = new double[] { -2.13, 1.48, -3.09, 4.52, 4.9, 3.9 };
    // ...
}
See Also