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 Jmix UI hierarchy panel and use the Handlers tab of the Jmix UI 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.

Other Events

AxisZoomEvent

This event is sent when chart axis scaling.

CategoryItemClickEvent

This event is sent when clicking on a category in the category axis.

CursorPeriodSelectEvent

This event is sent when selecting the display period with a cursor.

CursorZoomEvent

This event is sent when scaling the chart area with a cursor.

ChartClickEvent

This event is sent when a user clicks on the canvas.

ChartRightClickEvent

This event is sent when a user right-clicks on the canvas.

GraphClickEvent

This event is sent when clicking on a graph.

GraphItemClickEvent

This event is sent when clicking on a graph item.

GraphItemRightClickEvent

This event is sent when right-clicking on a graph item.

SliceClickEvent

This event is sent when clicking on a slice in a pie chart.

SlicePullInEvent

This event is sent when shifting a slice of a pie chart into the chart.

SlicePullOutEvent

This event is sent when shifting of a slice of a pie chart out of the chart.

SliceRightClickEvent

This event is sent when right-clicking on a slice in a pie chart.

RollOutGraphEvent

This event is sent when the user rolls-out of a graph.

RollOutGraphItemEvent

This event is sent when the user rolls-out of the data item.

RollOverGraphEvent

This event is sent when the user rolls-over a graph.

RollOverGraphItemEvent

This event is sent when the user rolls-over a data item.

ZoomEvent

This event is sent when scaling the canvas.