Show a spinner on ajax datasource load

Hi friends,

For perfomarce reasons we're loading ejs-chart datasource by AJAX calls. While data is returned I would like show a spinner on white area in chart. Basically, The same behaviour of the grid component.

Is it possible?

Thanks


3 Replies

SB Swetha Babu Syncfusion Team May 25, 2022 11:57 AM UTC

Hi Jesus,


Greetings from Syncfusion.


We can achieve your requirement by showing the spinner until the chart data gets loaded. We have achieve it by using the class in initial load and once the chart gets loaded, the spinner gets hide. Please find the below stackblitz link for your sample reference.


Sample link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ChartSpinner-471365075


In the above sample, we have rendered the line chart with 100 data. Please let us know whether the above sample meets your requirement.


Kindly, revert us if you have any concerns.


Regards,

Swetha



JM Jesús Mostajo May 26, 2022 10:20 AM UTC

Hi Swetha,

I have approached by hiding the spinner in result onSuccess AJAX event .

document.getElementById('ChartSpinner').style.display = "none";

Thanks !



SB Swetha Babu Syncfusion Team May 27, 2022 04:10 AM UTC

Hi Jesus,


Please get back to us if you have any concerns.


Regards,

Swetha


Loader.
Up arrow icon