plotAreaClick

Fired when the user clicks the plot area.

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. Available only for categorical charts (bar, line, area and similar).

e.element Object

The DOM element of the plot area.

e.originalEvent Object

The original browser event that triggered the click action.

e.sender kendo.dataviz.ui.Chart

The widget instance which fired the event.

e.value Object

The data point value. Available only for categorical charts (bar, line, area and similar).

e.x Object

The X axis value or array of values for multi-axis charts.

e.y Object

The Y axis value or array of values for multi-axis charts.

Example - handle right click on plot area and disable context menu

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

Example - subscribe to the "plotAreaClick" event during initialization

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  series: [
    { data: [1, 2] }
  ],
  plotAreaClick: function(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
    console.log(e.value);
  }
});
</script>

Example - subscribe to the "plotAreaClick" event after initialization

<div id="chart"></div>
<script>
function chart_plotAreaClick(e) {
/* The result can be observed in the DevTools(F12) console of the browser. */
  console.log(e.value);
}
$("#chart").kendoChart({
  series: [
    { data: [1, 2] }
  ]
});
var chart = $("#chart").data("kendoChart");
chart.bind("plotAreaClick", chart_plotAreaClick);
</script>
In this article