I am using the kendo.dataviz.ui.Chart via the MVC wrapper. I am looking to fire an operation after the chart refreshes...
$("#mychart").data('kendoChart').refresh();
Once the animations, etc, finishes for the refresh, I would like be notified by a promise or chart event.
$("#mychart").data('kendoChart').refresh();
Once the animations, etc, finishes for the refresh, I would like be notified by a promise or chart event.
5 Answers, 1 is accepted
0
Hi,
Daniel
Telerik
You can use the dataBound event.
Regards,Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Sean Mars
Top achievements
Rank 1
answered on 23 Oct 2013, 08:15 PM
Thanks Daniel, but I believe that does not fire again unless I have client side datasource bound, which I do not. I call a refresh to resize the charts, not necessarily to get fresh data. I am using server side binding with the MVC wrapper.
0
Hello again,
Daniel
Telerik
The event will be triggered when the data is bound on the server as well. The data will be serialized and used for the dataSource.
Regards,Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Sean Mars
Top achievements
Rank 1
answered on 22 Nov 2013, 05:08 PM
Maybe the issue is that I do not want to tie the event to the Razor declaration. I was looking to do it from a JavaScript module as such $("#myDropdownList").data("kendoDropDownList").
0
Hi,
A handler for the dataBound event can also be bound via JavaScript by using the bind method:
Regards,
Daniel
Telerik
A handler for the dataBound event can also be bound via JavaScript by using the bind method:
@(Html.Kendo().Chart()
.Name("chart")
...
)
<
script
>
$(function () {
var chart = $("#chart").data("kendoChart");
chart.bind("dataBound", function (e) {
});
});
</
script
>
Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!