How to resolve the issue of loading Chart data for a bit longer time?

1 Answer 392 Views
Chart Grid
Daochuen
Top achievements
Rank 1
Iron
Veteran
Iron
Daochuen asked on 23 Aug 2021, 07:40 PM

 

Hello,

We used both kendo Grid and kendo Chart in our MVC project. When we load big data on Grid , the Processing Wheel image (see below image)  had automatically applied to UI even we don’t setting anything. Unlike Grid I did not found same image applied to the UI when get big data for chart. Since we need calculate the value based on the busyness logic which take bit longer time. Now user will wait in front of empty chart screen until chart finally showed up.  Could Telerik team have some guides for resolving the issue?  Thanks.

 

Image of Processing data...

1 Answer, 1 is accepted

Sort by
0
Petar
Telerik team
answered on 25 Aug 2021, 09:21 AM

Hello Daochuen,

Check this Show Overlay while Loading article. It shows how you can add a loader to the Chart before its data is loaded.  

To implement the demonstrated behavior in MVC context, you can add a div as below:

<div class="chart-loading"></div>

Then, in the document.ready function as the following:

$(document).ready(function() {
     // Spin all loading indicators on the page
     kendo.ui.progress($(".chart-loading"), true);
});

The above will show the loader over the Chart. To hide the loader, you need to define the below code in the function executed when the render event is triggered. 

var loading = $(".chart-loading", e.sender.element.parent());
kendo.ui.progress(loading, false);

I hope the above details will help you achieve what you need in your application. 

Regards,
Petar
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Chart Grid
Asked by
Daochuen
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Petar
Telerik team
Share this question
or