# Chart Animation

{% hint style="info" %}
Chart animation is available only for New Combo charts with time dimensions.
{% endhint %}

Chart animation through cross-filter replay allows controlled playback of time-based data, such as weather maps or GPS tracks. You can also animate on other nontemporal dimensions. For example, you can play through categories, or even map selections.

To enable crossfilter replay:

* Set the `ui/enable_crossfilter_replay`[ feature flag](/v8.5.0/immerse/customization.md#feature-flags) to `true`; the default value is `false`.
* Set the `ui/enable_chart_addons` [feature flag](/v8.5.0/immerse/customization.md#feature-flags) to true (the default value).

You also need to increase the size of the client-side cache to ensure that enough queries are cached to animate charts smoothly. Set the following feature flags to the recommended minimum values:

* `performance/query_cache_duration` : `240000`
* `performance/query_cache_size` : `50`
* `performance/vega_cache_duration` : `240000`
* `performance/vega_cache_size` : `40`

The duration flags list the number of milliseconds to store query results, with 240,000 ms (4 minutes) the recommended duration. The cache sizes are the number of queries to store, with 40 raster map queries and 50 non-raster non-map queries recommended. You may need to adjust your cache size or duration, depending on the size of your data.

{% hint style="info" %}
Due to required client-side caching, crossfilter replay is inherently *not* compatible with live streaming data. It should be used only on a table that does not change during the animation.
{% endhint %}

To use animation, create a New Combo chart with a time type dimension. On the chart More Options menu, click **CrossFilter Replay**.

<figure><img src="/files/NKVPqsB31AV3t6O7enkI" alt=""><figcaption></figcaption></figure>

Crossfilter replay controls added below the chart are visible when you mouse over the chart.

<figure><img src="/files/byUj6onchvtcHOfT1SjF" alt=""><figcaption></figcaption></figure>

**Controlling** is the name of the chart that is the focus of the animation.

Use the time scrub line slider to advance by frame through the animation. The left side shows your current timestamp, and the right side lets you specify the length of the animation in seconds.

Below that, choose the time unit by which to advance your animation.

Use the following button controls:

* GIF renders your animation and downloads it as a GIF, using the chart specified in the Controlling drop down. There is no way to build a gif across multiple charts at this time.
* Restart starts the animation from frame 1.
* Play/Pause plays or pauses the animation, depending on whether it is active when pressed.
* Use Loop to replay your animation when it reaches the end. If disabled, the animation plays once.


---

# 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://docs.heavy.ai/v8.5.0/immerse/chart-animation.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.
