# Multiple Charts in One Story

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-87b4a3604104aad664bc20f0096b3fd06822c32d%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### Add A Second Chart to Your Story[¶](https://github.com/ToucanToco/doc-v3/blob/main/visualizations-and-layouts/creating-visualizations/advanced-chart-configuration/broken-reference/README.md)

When creating a story, you can insert two different charts into the same story. To do this, open an existing story, go to the **Edit** menu, and select **Configure Chart**.\
This option appears twice, allowing you to add and configure two separate charts within your story.

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-b641907d4ea9569976b6121087d9d3622dcad572%2FC63154EF-F18E-47E2-BD26-0A7D245D994E.jpeg?alt=media" alt=""><figcaption></figcaption></figure>

The charts you’ll be creating are not interconnected; each will display separate information with no shared interactions, except for filters, if desired.

### Crossfilter charts (ex master-slave)

When creating a story, you can include two charts that are linked together. The upper chart acts as a filter for the lower one—this setup is known as a *crossfilter chart*.

#### Step 1: Create a dual-chart story

Begin by creating both charts independently—no need to worry about linking them just yet.

<figure><img src="https://1809014303-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FZxYYf1KpgarKMgMsDCrw%2Fuploads%2Fgit-blob-bd51c0a40c986ddac824521fac87db65b35099d7%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Step 2: Link your charts with crossfiltering[¶](https://github.com/ToucanToco/doc-v3/blob/main/visualizations-and-layouts/creating-visualizations/advanced-chart-configuration/broken-reference/README.md)

Once both charts are created, you can connect them using crossfiltering.

{% @arcade/embed url="<https://app.arcade.software/share/OGjidMc58ScoENsexzbe>" flowId="OGjidMc58ScoENsexzbe" %}

To set up your crossfilter, click the link icon on your first chart and ensure the second chart is properly linked—you’ll see the link icon in the center of the second chart highlighted with a yellow background.\
Next, choose the variable you want to use as the filter; this variable must exist in both datasets, or the crossfilter won’t work.\
To test your setup, simply click on data points in the first chart. If the second chart updates accordingly, your crossfilter has been successfully configured.

#### Having trouble finding your dataset name?

Select the table view to explore the columns in your dataset.

{% @arcade/embed url="<https://app.arcade.software/share/o92yRmjVqNFFJ4j5MqE4>" flowId="o92yRmjVqNFFJ4j5MqE4" %}

**Supported Primary Charts for Crossfiltering**

{% hint style="warning" %}
Note

All charts can be used as filtered charts but only those listed below can be used as primary charts.
{% endhint %}

The following charts can be used as primary:

|                 | New Chart Design | Legacy Chart Design |
| --------------- | ---------------- | ------------------- |
| Barlinechart    | ✅                | ✅                   |
| Linechart       | ✅                | ✅                   |
| Barchart        | ✅                | ✅                   |
| Stackedbarchart | ✅                | ✅                   |
| Leaderboard     | ✅                | ✅                   |
| Heatmap         | ❌                | ✅                   |
| Circularchart   | ❌                | ✅                   |
| Mapchart        | ❌                | ✅                   |

**Crossfiltering with Dates**

{% hint style="warning" %}
**Warning:** Date formats can be tricky—here’s a tip to avoid issues:\
Ensure that the date column uses the **same format** in both the primary and filtered datasets. Inconsistent formats may prevent the crossfilter from working correctly.
{% endhint %}

**Crossfiltering with HKPIs**

{% hint style="warning" %}
**Note:** You can use KPIs with a crossfilter triggered by the master chart. Just make sure to include your HKPI dataset in the crossfilter configuration.
{% endhint %}

### Filtering Multiple Charts[¶](https://github.com/ToucanToco/doc-v3/blob/main/visualizations-and-layouts/creating-visualizations/advanced-chart-configuration/broken-reference/README.md)

When your story includes multiple charts, you can choose whether a filter applies to one chart or to both.\
For each filter, simply select which dataset(s) it should affect.

{% @arcade/embed url="<https://app.arcade.software/share/XKPdkPgfI4MTxYixuPPT>" flowId="XKPdkPgfI4MTxYixuPPT" %}
