> ## Content Index
> Fetch the complete content index at: https://www.vizney.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Create an Interactive Custom Legend for Tableau Heatmaps
- URL: https://www.vizney.com/tableau-heatmap-interactive-custom-legend/
- Published: 2026-08-09T09:55:44.000Z
- Updated: 2026-08-09T09:55:44.000Z
- Author: Yehwan Hwang
- Tags: Tips & Tricks

Heatmaps are highly effective for capturing overall data trends by expressing metric sizes through color gradients. However, relying solely on color shading makes it challenging for users to pinpoint precisely where a specific cell's value falls within the entire spectrum.

![](https://storage.ghost.io/c/71/f6/71f6ee37-5711-4588-b703-c29372b31c0a/content/images/2026/08/Default-Legend.png)

Tableau's default color legend is purely static and cannot dynamically indicate the exact relative level of a hovered cell. To overcome this limitation, you can replace the native color legend with a **custom bar chart sheet** designed as a legend bar, and link it using a **Dashboard Highlight Action**.

---

### Core Logic & Approach

1. **Build the Main Heatmap Sheet**  
Create a standard heatmap by placing continuous measures onto the Color mark.

![](https://storage.ghost.io/c/71/f6/71f6ee37-5711-4588-b703-c29372b31c0a/content/images/2026/08/image-2.png)

1. **Create a Custom Legend Sheet**  
Build a separate worksheet featuring a simple bar chart that spans the full data range. Apply the exact same color palette used in the heatmap to mirror a traditional legend bar.

![](https://storage.ghost.io/c/71/f6/71f6ee37-5711-4588-b703-c29372b31c0a/content/images/2026/08/image-3.png)

1. **Configure Dashboard Highlight Action**  
Place both sheets on the dashboard, then navigate to \[Dashboard\] > \[Actions\] and add a Highlight Action. Set the Heatmap as the Source Sheet, the Custom Legend as the Target Sheet, and choose **'Hover'** as the trigger condition.

![](https://storage.ghost.io/c/71/f6/71f6ee37-5711-4588-b703-c29372b31c0a/content/images/2026/08/image-4.png)

With this setup, hovering over any heatmap cell instantly highlights its corresponding position on the custom legend bar, allowing users to immediately grasp the exact relative magnitude of the data.

To inspect the detailed sheet structures and dashboard action configurations, you can download the example workbook (`.twbx`) directly from the embedded Tableau Public view below.