# Multilayer Charts

You can superimpose multiple Pointmap, Linemap, Choropleth, and Geo Heatmap charts on one another to look for correlations between datasets.

To create a multilayer chart:

1. Create one of the charts that support multilayer.
2. Click the **Add Layer** tab.
3. Create another multilayer-compatible chart in the new layer.
4. Click the **Master** tab.
5. Adjust the **Opacity** and the **Zoom level** of the chart layers using the sliders on the right.

You can change the order of the layers by dragging the contents of a layer field on top of another layer field.

A single chart can have up to eight layers, depending on your server memory and processing capacity.

## Example: Opacity with Multilayer Charts

Create a new Pointmap. For the **Data Source**, use the official database of [UFO sightings](https://github.com/planetsig/ufo-reports/tree/master/csv-data).

Set the **Lon** measure to longitude and **Lat** measure to latitude. Set the **Size** measure to duration\_seconds. Set the **Color** measure to shape.

<figure><img src="https://875484548-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWRc88gdQeZ7mRBB46Rx%2Fuploads%2Fgit-blob-3d27efb5610158f7bda8db135e4b0e3c77b7ef26%2FSS_50%20(1).jpg?alt=media" alt=""><figcaption></figcaption></figure>

Click the **Add Layer** tab, and create a Geo Heatmap. Set the data source to the flights\_2008\_7M database. Set **Lon** to dest\_lon and **Lat** to dest\_lat. Set the **Color** measure to AVG depdelay.

<figure><img src="https://875484548-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWRc88gdQeZ7mRBB46Rx%2Fuploads%2Fgit-blob-f9ce2389e74c0019464762169aa7fef03edceeb0%2FSS_51.jpg?alt=media" alt=""><figcaption></figcaption></figure>

The resulting chart compares a Geo Heatmap of flight departure delays to a Pointmap of UFO sightings.

Click the **Master** tab, and reduce the opacity of the UFOs Sighted chart to enhance the visibility of the flights\_2008\_7M delay information.

<figure><img src="https://875484548-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWRc88gdQeZ7mRBB46Rx%2Fuploads%2Fgit-blob-1078b2c328bf97e32701959d98c925b30adb78f9%2FSS_52.jpg?alt=media" alt=""><figcaption></figcaption></figure>

Clearly, some flights have been delayed where UFOs have been sighted, making it impossible to make a definitive statement that there is no correlation between the two datasets. Spooky.

## Example: Zoom Level with Multilayer Charts

You can configure the visibility of a layer based on zoom level.

This chart has two layers: a Pointmap based on tweets and a Choropleth based on 14 states defined by name, with the rest defined as Other. Currently, the chart is zoomed to level 5.

<figure><img src="https://875484548-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWRc88gdQeZ7mRBB46Rx%2Fuploads%2Fgit-blob-66f52936d9b3e143554f359f45c3b272ba0480fc%2FSS_53.jpg?alt=media" alt=""><figcaption></figcaption></figure>

You determine that when you zoom to level 2, you no longer want to see the states layer, so you adjust the sliders to reflect this.

<figure><img src="https://875484548-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgWRc88gdQeZ7mRBB46Rx%2Fuploads%2Fgit-blob-1589cf2160749faebc20e75460b7b518aa99b2b8%2FSS_54.jpg?alt=media" alt=""><figcaption></figcaption></figure>
