Events
You can subscribe to all Chart events.
Handling by Handler Name
The following examples demonstrates how to subscribe to events by a handler name.
@(Html.Kendo().Chart<Kendo.Mvc.Examples.Models.ElectricityProduction>()
.Name("chart")
.Events(events => events
.SeriesClick("onSeriesClick")
.DataBound("onDataBound")
)
)
<script>
function onSeriesClick(e) {
// Handle the seriesClick event
}
function onDataBound(e) {
// Handle the dataBound event
}
</script>
Handling by Template Delegate
@(Html.Kendo().Chart<Kendo.Mvc.Examples.Models.ElectricityProduction>()
.Name("chart")
.Events(events => events
.SeriesClick(@<text>
function() {
// Handle the seriesClick event
}
</text>)
.DataBound(@<text>
function() {
// Handle the dataBound event
}
</text>)
)
)