> For the complete documentation index, see [llms.txt](https://flutter.wednesday.is/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://flutter.wednesday.is/charts/guides/interactions.md).

# Interactions

To start listening for interactions on any chart, provide the appropriate `[SeriesType]InteractionEvents` class to the `interactionEvents` parameter of any `Series`.&#x20;

For example, `BarSeries` will accept `interactionEvents` of type `BarInteractionEvents`.

Look into interaction guides of individual charts to learn more about chart-specific interaction details.

* [Bar Chart Interactions](/charts/guides/cartesian-charts/charts/bar-chart/bar-interactions.md)
* [Pie Chart Interactions](/charts/guides/radial-charts/charts/pie-and-donut-chart/interactions.md)

## Interaction Events

Every `InteractionEvents` class supports these types of interaction callbacks.

<table><thead><tr><th width="228">Event</th><th>Description</th></tr></thead><tbody><tr><td><code>onTapDown</code></td><td>Called when the pointer that will trigger a tap gesture comes in contact with the screen.</td></tr><tr><td><code>onTapUp</code></td><td>Called when the pointer that will trigger a tap gesture stops making contact with the screen.</td></tr><tr><td><code>onTap</code></td><td>Call after the tap gesture is completed, i.e. right after <code>onTapUp</code>.</td></tr><tr><td><code>onDoubleTap</code></td><td>Called when a double tap gesture is detected.</td></tr><tr><td><code>onDragStart</code></td><td>Called when a pointer comes in contact with the screen and starts to move.</td></tr><tr><td><code>onDrag</code></td><td>Called when the pointer location is updated for the pointer that started the drag gesture.</td></tr><tr><td><code>onDragEnd</code></td><td>Called when the pointer that started the drag gesture stops moving.</td></tr><tr><td><code>onRawInteraction</code></td><td>Called for every type of interaction event.</td></tr></tbody></table>

## Enabling and Disabling interactions

Along with the interaction callbacks, every `InteractionEvents` class has a `isEnabled` boolean to enable and disable interactions.

```dart
BarSeries(
    ...
    interactionEvents: BarInteractionEvents(
          isEnabled: true,
          ...
    ),
);
```

## Interaction Result

Each `InteractionEvent` callback will receive a `Series` specific interaction result as an argument.

Look into interaction guides of individual charts to learn more about chart-specific interaction details provided to in the interaction result.

Each interaction result has

| Property          | Description                                         |
| ----------------- | --------------------------------------------------- |
| `localPosition`   | The offset of the interaction relative to the chart |
| `interactionType` | Relevant`TouchInteractionType` for the result.      |

## TouchInteractionType

`TouchInteractionType` is an enum with the following values

* `tap`
* `tapUp`
* `tapDown`
* `doubleTap`
* `dragStart`
* `drag`
* `dragEnd`
