Hello Asad,
Based on the information gathered here, I believe that the Chart is using a DataSource to request the remote data. Please correct me if I am wrong.
I tested the scenario with this demo - https://demos.telerik.com/aspnet-core/pie-charts/remote-data-binding
The only modifications I made are:
<div class="demo-section k-content wide">
<h3>1024x768 screen resolution trends</h3>
@foreach (var year in (IEnumerable<string>)ViewData["years"])
{
@(Html.Kendo().Chart<Kendo.Mvc.Examples.Models.ScreenResolutionRemoteDataViewModel>()
.Name("chart" + year)
.Title(year)
.HtmlAttributes(new { @class = "small-chart" })
.Legend(legend => legend
.Visible(false)
)
.DataSource(ds =>
{
ds.Read(read => read.Action("_SpainElectricityProduction", "Pie_Charts"));
ds.Filter(filter => filter.Add(model => model.Year).IsEqualTo(year));
ds.Sort(sort => sort.Add(model => model.Year).Ascending());
}
)
.Events(e => e.DataBound("onDataBound"))
.Series(series => series
.Pie(model => model.Share, model => model.Resolution)
.ColorField("Color")
.Padding(0)
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0:N0}")
.Template("#= category # - #= kendo.format('{0:P}', percentage)#")
)
)
}
</div>
<style>
.k-chart.small-chart {
display: inline-block;
width: 120px;
height: 120px;
}
</style>
<script>
function onDataBound(e) {
console.log("test");
}
</script>
On my side, the event fired as expected.
Having said that, could you please elaborate on the exact implementation of your project?
Regards,
Preslav
Progress Telerik