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

[Solved] How to show loading element on chart binding

1 Answer 99 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Joanes
Top achievements
Rank 1
Joanes asked on 20 Mar 2012, 06:31 PM
Hi:
Is it possible to show loading gif while binding/rebinding a chart client side?

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 22 Mar 2012, 03:44 PM
Hi Joanes,

Generally speaking, this feature is not supported, but you could achieve the described behavior using the following approach:
 On the OnDataBinding event place a <div> with the following styling over the Chart:
  1. function onDataBinding(e) {
         $('<div class="custom-overlay"/>').appendTo("#chart");
    }
    ...

    <style>
     .custom-overlay {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        opacity: .6;
        filter: alpha(opacity=60);
        background: #fff url("@Url.Content("~/Content/loadingImage.gif")") no-repeat 50% 50%;
        }
    </style>
           
  All the best,
Iliana Nikolova
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now.
Tags
Chart
Asked by
Joanes
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or