axisLabelClick

Fired when the user clicks an axis label.

The event handler function context (available via the this keyword) will be set to the widget instance.

Event Data

e.axis Object

The axis that the label belongs to.

e.dataItem Object

The original data item used to generate the label. Available only for data bound category axis.

e.element Object

The DOM element of the label.

e.index Object

The label sequential index or category index.

e.sender kendo.dataviz.ui.Chart

The widget instance which fired the event.

e.text String

The label text.

e.value Object

The label value or category name.

Example - subscribe to the "axisLabelClick" event during initialization

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

Example - subscribe to the "axisLabelClick" event after initialization

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