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
close icon

How to show progress bar or loading fucntion

Can you provide example of progress bar.

In mvc application while plotting chart I want to display progress bar 

Can your provide a better example progress bar


Thanks in advance
Waiting for your quick reply as always.



1 Reply

SS Saranya Sivakumar Syncfusion Team June 4, 2015 09:15 AM UTC

Hi Bharat,

Thanks for using Syncfusion products.

We would like to let you know that we can display the Progress bar in the Modal Dialog while plotting the Chart control. We can achieve this by defining Modal dialog with Progressbar control in the view page after defining the Chart control as shown in the following code snippet.

<code>

@{Html.EJ().Dialog("lognForm").ContentTemplate(@<div>

    @Html.EJ().ProgressBar("progressBar").Height("22px").ClientSideEvents(e => e.Complete("oncompleted"))

    </div>).EnableModal(true).ShowHeader(false).EnableResize(false).Width(1000).ClientSideEvents(evt => evt.Close("onDialogClose")).Render();}

</code>

In the PreRender event of our Chart control we have to render the Dialog control along with the progress bar as shown in the following code snippet.

<code>

function renderProgress() {

        $("#lognForm").show();

      var  timer = window.setInterval(draw, 100);

      

    }

</code>

Then in the Complete event of our Progress bar control we have to clear the interval timer and close the Dialog as shown in the following code snippet.

<code>

function oncompleted(args) {           

            var progresObj = $("#progressBar").data("ejProgressBar");

        progresObj.option("text", "Completed");

        timer = window.clearInterval(timer);

        k = 0;

        $("#lognForm").ejDialog("close");

    }

</code>

For your convenience we have prepared the custom sample based on your requirement and the same can be downloaded from the following link location.

http://www.syncfusion.com/uploads/user/forum/119302/ze/ChartWithProgressBar-336301130

Please let us know if you have any other queries.

Regards,

Saranya.S


Loader.
Live Chat Icon For mobile
Up arrow icon