# 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`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://flutter.wednesday.is/charts/guides/interactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
