# Events

You can subscribe to all Chart [events](https://www.telerik.com/aspnet-core-ui/documentation/api/kendo.mvc.ui.fluent/charteventbuilder).

## Handling by Handler Name

The following examples demonstrates how to subscribe to events by a handler name.

```Razor HtmlHelper
    @(Html.Kendo().Chart<Kendo.Mvc.Examples.Models.ElectricityProduction>()
        .Name("chart")
        .Events(events => events
            .SeriesClick("onSeriesClick")
            .DataBound("onDataBound")
        )
    )
```

```Razor TagHelper
    @addTagHelper *, Kendo.Mvc
    <kendo-chart name="chart" 
                on-series-click="onSeriesClick" 
                on-data-bound="onDataBound">
    </kendo-chart>
```

```JS script.js
    <script>
        function onSeriesClick(e) {
            // Handle the seriesClick event
        }

        function onDataBound(e) {
            // Handle the dataBound event
        }
    </script>
```

## Handling by Template Delegate

The following example configures the event handlers with inline template delegates.

```Razor HtmlHelper
    @(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>)
        )
    )
```

## Next Steps

* [Getting Started with the Bar Chart](https://www.telerik.com/aspnet-core-ui/documentation/html-helpers/charts/bar-chart/getting-started)
* [Basic Usage of the Charts for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/charts)

## See Also

* [Client-Side API of the Chart](https://docs.telerik.com/kendo-ui/api/dataviz/ui/chart)
* [Server-Side API of the Chart](https://www.telerik.com/aspnet-core-ui/documentation/api/chart)
* [Knowledge Base Section](https://www.telerik.com/aspnet-core-ui/documentation/knowledge-base)
