This is a migrated thread and some comments may be shown as answers.

[Solved] Force spinning/waiting indicator

1 Answer 135 Views
Chart for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Nikhil
Top achievements
Rank 1
Nikhil asked on 17 Dec 2013, 04:19 PM
It looks like there is a built-in spinning mechanism that lets users know data is loading into the chart. I imagine this appears when a chart is created and a URL is used as the dataSource. However, I download data before implementing the chart - is there any way I can initiate the spinner manually, and then turn it off when the chart has loaded?

Thanks,
Nikhil

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Yankov
Telerik team
answered on 18 Dec 2013, 01:05 PM
Hi Nikhil,

You can set the progress indicator programmatically by using the Telerik.UI.progress(element, show) function, where the element parameter must be an HTML element and show is a Boolean type parameter specifying whether to show or hide the indicator.

On the RadChart control it is advisable to set the progress indicator on the element with class "k-chart". Here is an example code sample that will display a progress indicator over an empty chart and will hide it after 2 seconds.
var chart = $("#chart .k-chart");
Telerik.UI.progress(chart, true);
 
setTimeout(function () {
    Telerik.UI.progress(chart, false);
}, 2000);

Let me know if you have any further questions.

Regards,
Martin Yankov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
Chart for HTML
Asked by
Nikhil
Top achievements
Rank 1
Answers by
Martin Yankov
Telerik team
Share this question
or