yccteam
yccteam

Reputation: 2311

Kendoui Chart - how to know the chart has finished loading?

I have a kendo ui chart. It gets a lot of data from the server.

I found out how to find when the data has loaded.

The problem is that when there is a lot of data, the graph can take 2 to 5 seconds just to plot. Is there a way to know the time the graph is ready?

Upvotes: 4

Views: 4352

Answers (2)

Mark Erasmus
Mark Erasmus

Reputation: 2385

There is now a hookup for the render event. http://demos.telerik.com/kendo-ui/chart-api/events

$("#chart").kendoChart({
   ...
   render: onRender,
   ...
});

function onRender(e) {
    console.log("Render");
}

Upvotes: 4

Marko Gresak
Marko Gresak

Reputation: 8197

You can use dataBound inside kendoChart object:

$("#chart").kendoChart({
    dataBound: function () {
        console.log("loading is done");
    }
    // other code
    // ...
});

See this fiddle (not my work, I believe it's courtesy of Daniel, admin @ Telerik forums).

Upvotes: 0

Related Questions