legendItemClick

Fires when an legend item is clicked, before the selected series visibility is toggled. Can be cancelled.

Example - prevent toggling the series visibility on legend item click

function onLegendItemClick(e) {
    e.preventDefault();
}

Event Data

e.text String

The name of the series.

e.series Object

The series options.

e.seriesIndex Number

The series index.

e.pointIndex Number

The point index.

e.preventDefault Function

If invoked the default action (toggle series visibility) will be prevented.

e.element Object

The DOM element of the plot area.

e.sender kendo.dataviz.ui.StockChart

The widget instance which fired the event.

In this article