Events
It is possible to configure handling of different event types for each chart type.
To generate a handler stub in Jmix Studio, select the component in the screen descriptor XML or in the Component Hierarchy panel and use the Handlers tab of the Component Inspector panel. Alternatively, you can use the Generate Handler button in the top panel of the screen controller. |
You can see a list of events that can be handled for a particular chart in the corresponding part of the Charts Types section.
Event handling examples are available in Using Events section.
Common Events
You can handle the following events that are available for all chart types:
-
LegendItemHideEvent
- is sent when hiding a legend item. -
LegendItemShowEvent
- is sent when showing a legend item. -
LegendLabelClickEvent
- is sent when clicking on a legend label. -
LegendMarkerClickEvent
- is sent when clicking on a legend marker.
Above the listeners, the SeriesBasedChart
interface contains zoomOut
, zoomToIndexes
, and zoomToDates
methods for manipulating the chart axis.
The CoordinateChart
interface similarly provides the following methods for the value axis: zoomOutValueAxes
, zoomOutValueAxis
, zoomValueAxisToValues
, and zoomValueAxisToValues
.