We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Is there a way to get a spinner to appear over a chart while it is loading?

Hi!

Is there a way to get the Spinner control to show as a modal over a chart control in a Blazor WASM app?  I'm trying to get the spinner to show in the center of the chart while the data is loading, since the data load is very slow.

Any help will be Much appreciated!



1 Reply

MR Mallesh Ravi Chandran Syncfusion Team May 25, 2023 10:32 AM UTC

Hi David


To achieve the desired functionality, we have prepared a sample that demonstrates how to show the spinner in the center of the chart while the data is loading. In the sample, we utilize the OnInitializedAsync() method to initially show the spinner, and once the chart is loaded, we hide the spinner.


   

    protected override async Task OnInitializedAsync()

    {

this.Visible = true;

    }

    public async void LoadedEvent(LoadedEventArgs args)

    {

await Task.Delay(1000);

await SpinnerObj.HideAsync();

    }

 


Regards,

Mallesh



Attachment: WASM_d50bd142.zip


Loader.
Live Chat Icon For mobile
Up arrow icon