org.moxieapps.gwt.highcharts.client.events
Interface SeriesLegendItemClickEventHandler
public interface SeriesLegendItemClickEventHandler
An interface that can be used as a callback handler when legend item belonging to the series is clicked.
General usage is as follows:
chart.setSeriesPlotOptions(new SeriesPlotOptions()
.setSeriesLegendItemClickEventHandler(new SeriesLegendItemClickEventHandler() {
public boolean onClick(SeriesLegendItemClickEvent seriesLegendItemClickEvent) {
Window.alert("User changed the visibility state of the series: " + clickEvent.getSeriesName());
return true;
}
)
});
See the documentation on the SeriesLegendItemClickEvent
class for more details on the data
available when a legend item click event occurs.
- Since:
- 1.1.0
- Author:
- squinn@moxiegroup.com (Shawn Quinn)
Method Summary |
boolean |
onClick(SeriesLegendItemClickEvent seriesLegendItemClickEvent)
This method is fired whenever the legend item belonging to the series is clicked. |
onClick
boolean onClick(SeriesLegendItemClickEvent seriesLegendItemClickEvent)
- This method is fired whenever the legend item belonging to the series is clicked. See
the
SeriesLegendItemClickEvent
class for more details on the data available when this event is fired.
The default action is to toggle the visibility of the series. This can be prevented by returning false.
- Parameters:
seriesLegendItemClickEvent
- The details of the event that occurred.
- Returns:
- The response to send back to the event handler function. Return false to prevent
the default action which is to toggle the visibility of the series.
Copyright © 2015. All Rights Reserved.