I'm trying to add an exploding function to my pie chart. I've been able to locate the follow javascript code to assist from the Kendo UI documentation:
seriesClick: function(e){
$.each(e.sender.dataSource.view(), function() {
// Clean up exploded state
this.explode = false;
});
// Disable animations
e.sender.options.transitions = false;
// Explode the current slice
e.dataItem.explode = true;
e.sender.refresh();
}
Using the MVC version I'm call the series click with:
.Events(events => events
.SeriesClick("explodingPie")
)
Along with the following Javascript:
function explodingPie(e) {
$.each(e.sender.dataSource.view(), function() {
this.explode = false;
});
e.dataItem.explode = true;
e.sender.refresh();
}
I'm unsure why
$.each(e.sender.dataSource.view(), function() {
isn't working properly.