How to Show Legend in Tableau Worksheet
It’s a classic Tableau moment: you’ve dragged your fields, created a beautiful color-coded chart, and then suddenly - the legend explaining what those colors mean has vanished. Whether you accidentally clicked the 'x' or it never appeared in the first place, a visualization without a legend is often just a jumble of abstract shapes. This guide will help you show a legend in a Tableau worksheet, plus a few valuable customization tips to make your charts even clearer.
What Exactly is a Tableau Legend?
Before we dive into getting it back, let’s quickly clarify what a legend is. In Tableau, a legend is a key that helps your audience decode the visual information on your chart. It acts as a guide, linking the data values from a field to the visual properties - or "Marks" - you’ve used to encode them.
You’ll typically see three primary types of legends in Tableau, corresponding to the marks they describe:
- Color Legends: These are the most common. If you drag a dimension like 'Region' onto the Color mark, Tableau will assign a unique color to each region and generate a legend to show which color corresponds to which region (e.g., Blue = West, Orange = East).
- Size Legends: When you drag a measure like 'Sales' onto the Size mark, Tableau uses different sizes of marks (like circles or bars) to represent the value. The size legend shows the range of values, indicating that larger circles mean higher sales.
- Shape Legends: Similarly, dragging a dimension like 'Ship Mode' to the Shape mark assigns a unique shape to each mode (e.g., Circle = Standard Class, Square = First Class). The shape legend tells you what each symbol means.
Without these legends, your chart can’t be properly interpreted. They are the essential link between your data and the story you’re trying to tell.
Why Did My Tableau Legend Disappear?
There are a few common reasons why you might not see a legend on your worksheet. Understanding these can prevent it from happening again.
- You Accidentally Closed It: The most frequent culprit is unintentionally clicking the small “X” on the corner of the legend card. It's an easy mistake to make, especially when you're quickly rearranging elements on your worksheet or dashboard.
- It Was Never Generated: When you drag a field onto the Color, Size, or Shape marks, Tableau automatically adds a legend. However, if you removed that field from the Marks card, the legend will disappear along with it. Putting the field back won't always automatically restore the legend card.
- Somebody Else Hid It: If you're working with a Tableau workbook created by someone else, they may have deliberately hidden the legend to save space or because it was redundant for their final dashboard design. You may want to bring it back.
Luckily, no matter how it disappeared, bringing it back is very straightforward.
How to Show a Legend in a Tableau Worksheet: 3 Simple Methods
Here are three reliable ways to restore a missing legend in Tableau, starting with the most direct method.
Method 1: Use The "Show/Hide Cards" Menu Bar on Any Card
Every small box of info visible on your Tableau canvas is a "card" - including filters, parameter controls, and of course, legends. The "Show/Hide a Card" menu will show any card available for the given visualization you have in the canvas.
- Go up to any visible card and look for the menu at the top of the container. This is a dropdown for any of your "cards" - whether it is Dimensions, Measures, Sets, Parameters card (at left), or your filters on the right.
- Scroll down to the "Legends" menu. Here you'll see a checklist for every available legend.
Simply click the one that has a checked box you don't require to hide it, and click one without a checked box (but active) to show it on your canvas.
View > Legends > (select Color/Size/Shape Legend from the dropdown)
Tableau is smart enough to detect any fields that you are using to encode on your marks card, so your menu will reflect any available legend for enabling. Select the legend you require. Your legend will pop up in the Tableau Canvas view for you to manage.
Method 2: Use the Drop-Down Menu on the Field "Pill"
For a quicker, more contextual method, you can add a legend directly from the field "pill" on the Marks card.
- Navigate to the Marks card on the left side of your worksheet.
- Locate the field pill (e.g., 'Region' on Color or 'Profit' on Size) whose legend is missing.
- Click the small drop-down arrow on the right side of the pill. You can also simply right-click the pill.
- From the context menu that appears, select "Show Legend".
The corresponding legend will instantly reappear in its last known position on your worksheet. This is often the fastest way to get a legend back if you know exactly which one you need.
Method 3: Reset All Cards to Default
If you’ve accidentally closed multiple cards (legends, filters, etc.) and just want to reset your view to Tableau’s default layout, there’s an option for that.
- Go to the top Analysis menu bar and click "Worksheet".
- Hover over "Show Cards" again.
- At the bottom of this menu, click "Reset Cards".
This action will restore all default cards for your current view, including any available legends, the title, and the caption. Be aware that this is a bit of a "nuclear option" - it will bring back everything, so you might need to re-hide any cards you don’t need.
Quick Tips for Customizing Your Tableau Legend
Getting your legend back on screen is just the first step. To make your visualizations truly effective, you’ll often want to tweak the legend's appearance and functionality.
How to Edit the Legend Title
The default title of a legend is usually just the name of the data field, which isn't always descriptive. Instead of 'SUM(Profit)', you might want it to say 'Total Profit by Region'.
- Right-click the legend's title. This will give you the option to "Edit Title…” on all your cards including Filters and Parameters. Then type a new name that makes more sense!
- Alternatively, click the dropdown arrow on the top-right of your legend, type a more user-friendly name, and then hit Enter.
How to Re-Arrange Legend Items
The order of items in your legend may not match the order that tells the best story. You can easily re-order them. Simply click and drag the items within the legend list to place them in any order you’d like. For instance, you could move the top performing region to the top of the list for emphasis.
Edit Aliases
Managing your aliases is easy and enhances data presentation:
- Find and right-click on a dimension in the data pane on the left. For instance, you may have a "Customer" database table with a "Customer Gender" field labeled as 'M' and 'F'. You can alias these to “Male” and “Female” in your Tableau visualization and chart.
- Select the target field from your Dimension or Measure card. From the dropdown, choose the Aliases menu entry to bring up your options.
- Change your assigned aliases and hit Ok to complete it. It's that simple!
Floating vs. Tiled Legends in a Dashboard
When you add elements to a dashboard, they default to a "tiled" layout - occupying their own blocks of space. This arrangement forces other elements to adjust within the grid.
The "floating" option allows you to place your legend over any location, which can be useful for using empty areas, such as a blank spot on a map, for a cleaner visual presentation. To make any object floating:
- Select the particular legend within your dashboard canvas.
- Use the element dropdown and check the "Floating" option. Alternatively, use Shift-Dragging to instantly convert it to floating.
Final Thoughts
Having a visible legend is an integral part of Tableau development. Properly labeling your legend enhances user experience and ensures accurate data interpretation.
Learning visualization tooling like Tableau is valuable. For those quickly overwhelmed by its complexities, consider using Graphed. With Graphed, you can effortlessly bring your data - regardless of format or platform - and get visualized dashboards for quick, intuitive answers.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.