Events

It is possible to configure handling of different event types for each chart type.

Чтобы сгенерировать заглушку слушателя в Jmix Studio, выберите компонент в XML-дескрипторе экрана или на панели иерархии Jmix UI и используйте вкладку Handlers на панели инспектора Jmix UI.

В качестве альтернативы вы можете воспользоваться кнопкой Generate Handler на верхней панели контроллера экрана.

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.