legendItemHover
Fires when an legend item is hovered.
Event Data
e.element Object
The DOM element of the plot area.
e.pointIndex Number
The point index.
e.sender kendo.dataviz.ui.Chart
The widget instance which fired the event.
e.series Object
The series options.
e.seriesIndex Number
The series index.
e.text String
The name of the series.
Example - subscribe to the "legendItemHover" event during initialization
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [6, 2, 3], name: "Task 1" },
{ data: [1, 5, 2], name: "Task 2" }
],
legendItemHover: function(e){
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log("Hovered an item with text: " + e.text);
}
});
</script>
Example - subscribe to the "legendItemHover" event after initialization
<div id="chart"></div>
<script>
function chart_legendHover(e){
/* The result can be observed in the DevTools(F12) console of the browser. */
console.log("Hovered an item with text: " + e.text);
}
$("#chart").kendoChart({
series: [
{ data: [6, 2, 3], name: "Task 1" },
{ data: [1, 5, 2], name: "Task 2" }
]
});
var chart = $("#chart").data("kendoChart");
chart.bind("legendItemHover", chart_legendHover);
</script>