Edit this page

seriesClick

Fired when the user clicks the chart series.

The click event will be triggered by tap and contextmenu events. The e.originalEvent.type field can be inspected to distinguish between the original events.

Event Data

e.category Object

The data point category

e.dataItem Object

The original data item (when binding to dataSource).

e.element Object

The DOM element of the data point.

e.originalEvent Object

The original browser event that triggered the click action.

e.percentage Object

The point value represented as a percentage value. Available only for donut, pie and 100% stacked charts.

e.sender kendo.dataviz.ui.Chart

The widget instance which fired the event.

e.series Object

The clicked series.

e.series.type String

The series type

e.series.name String

The series name

e.series.data Array

The series data points

e.stackValue Object

The cumulative point value on the stack. Available only for stackable series.

e.value Object

The data point value.

Example - handle right click on series and disable context menu

<div id="chart"></div>
<script>
$("#chart").kendoChart({
    series: [
        { data: [1, 2] }
    ],
    seriesClick: function(e) {
        if (e.originalEvent.type === "contextmenu") {
          // Disable browser context menu
          e.originalEvent.preventDefault();
        }
    }
});
</script>

Example - subscribe to the "seriesClick" event during initialization

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2] }
  ],
  seriesClick: function(e) {
    console.log(e.value);
  }
});
</script>

Example - subscribe to the "seriesClick" event after initialization

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2] }
  ]
});

functino chart_seriesClick(e) {
  console.log(e.value);
}

var chart = $("#chart").data("kendoChart");
chart.bind("seriesClick", chart_seriesClick);
</script>
Is this article helpful? Yes / No
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article

close
Dummy