How to Highlight Line Graph in Tableau
A simple line graph is good, but a line graph that tells a story is great. Highlighting a specific line or a moment in time is one of the most effective ways to guide your audience’s focus and make your main point impossible to miss. This tutorial will walk you through a few practical methods for highlighting line graphs in Tableau, from simple interactive clicks to dynamic user-controlled dropdowns.
Why Highlighting Your Line Graph is a Game-Changer
Imagine you’re presenting a dashboard showing sales trends for five different product categories over the last three years. Displaying five colored lines on a grid is informative, but it forces your audience to work. They have to scan the legend, trace each line with their eyes, and try to figure out which trend you’re talking about.
Now, imagine that with a single click or selection, one line - the one you’re discussing - turns a vibrant blue while the others fade into a muted gray. The story is instantly clear. Highlighting achieves several key goals:
- It Directs Attention: You control the narrative by visually emphasizing the most important data point or series.
- It Reduces Clutter: Fading non-essential lines into the background makes the chart cleaner and easier to interpret.
- It Improves Engagement: Interactive highlighting makes your dashboards more engaging and encourages users to explore the data themselves.
First, Let's Build a Basic Line Graph
Before we can highlight, we need something to highlight. Let's create a simple line graph using Tableau's sample "Superstore" dataset. Our goal is to see monthly Sales over time, broken out by Category.
If you already have your graph, you can skip to the next section. If not, here’s a quick setup:
- Connect to the Sample - Superstore data source in Tableau.
- Drag the Order Date field to the Columns shelf. Right-click it and make sure it's set to Month (the one that looks like "May 2017"). It should be a continuous green pill.
- Drag the Sales field to the Rows shelf.
- Drag the Category field to the Color mark on the Marks card.
You should now have a line graph with three different colored lines representing sales for Furniture, Office Supplies, and Technology. It's functional, but everyone's shouting for attention. Now, let's make it smarter.
Method 1: Highlighting a Single Line Using a Parameter
This is arguably the most common and flexible method for highlighting. We'll create a dropdown menu (a parameter) that allows the user to choose which category they want to focus on. It sounds technical, but it’s surprisingly straightforward.
Step 1: Create the Parameter
A parameter is just a way for a user to input a value. In our case, the value will be the category name.
- In the Data pane (the sidebar on the left), right-click on an empty space and select Create Parameter.
- Name your parameter something like "Select a Category".
- Set the Data type to String.
- Under Allowable values, choose List.
- Click the Add from Field button and select Category. This will automatically pull in "Furniture," "Office Supplies," and "Technology."
- Click OK.
Step 2: Create a Calculated Field to Use the Parameter
The parameter doesn't do anything on its own. We need to tell Tableau how to use it with a calculated field. This formula will essentially create a two-group system: the line the user selected, and "everything else."
- Right-click in the Data pane again and select Create Calculated Field.
- Name it "Highlight Color".
- Enter the following simple formula:
IF [Category] = [Select a Category] THEN [Category] ELSE "Other" ENDThis calculation checks each category. If it matches the one chosen in our parameter, it keeps the category name. If not, it lumps it into a generic "Other" group. Click OK.
Step 3: Apply the Logic to Your Chart
Now we just need to rewire our chart to use this new color logic.
- Drag your new calculated field, Highlight Color, directly onto the Color mark on the Marks card. This will replace the
Categorypill that was there before. - You'll notice the parameter control for "Select a Category" has appeared on your screen. If not, find your parameter in the Data pane, right-click it, and select Show Parameter.
- Click the dropdown menu of your parameter and choose one of the categories. You'll see one line get its own color, but the others will be lumped together. We're almost there!
Step 4: Assign Better Colors
The final step is to make the "Other" group less distracting.
- Click on the Color mark on the Marks card and select Edit Colors....
- You will see your categories and the "Other" group. Select "Other" from the list on the left.
- Choose a light gray from the color palette on the right.
- Now, assign more vibrant, distinct colors to your main categories (Furniture, Office Supplies, and Technology).
- Click OK.
And that’s it! Now, when a user selects "Technology" from the dropdown, that line will pop out in whatever color you chose, and the other two will retreat into a subtle gray background. It's clean, intuitive, and highly effective.
Method 2: Using a Dashboard Highlight Action
The second method is even more interactive. Instead of a dropdown, a user can click on a category name in a list or legend to highlight the corresponding line on the graph. This is done using a Dashboard Action.
Step 1: Set Up Your Dashboard
Dashboard actions work across different worksheets, so you need to have your line graph on a dashboard first.
- Create a new dashboard by clicking the "New Dashboard" icon at the bottom.
- Drag your line graph worksheet onto the dashboard. By default, Tableau might add the color legend. That legend is what we can use as our "selector" for the highlight action.
Step 2: Configure the Highlight Action
Here’s where you set up the interactive behavior.
- In the top menu, go to Dashboard > Actions....
- In the pop-up window, click Add Action and choose Highlight....
- A configuration window will appear. Let’s configure it:
- Click OK to close the action config, and OK again to close the actions list.
Now, go back to your dashboard and click one of the items in your color legend (e.g., click "Furniture"). You should see the Furniture line light up while the others fade out. Click on a different category, and the highlight will change. To clear the highlight, you can click on the same item again or on an empty part of the worksheet.
Method 3: Highlighting a Time Period with a Reference Band
Sometimes you don't want to highlight an entire line but rather a specific period across all lines. This is perfect for showing the impact of a product launch, a marketing campaign, or a holiday sale.
Step 1: Create Start and End Date Parameters
Just like Method 1, we use parameters to let the user choose the date range they want to see highlighted.
- Create a new parameter named "Start Date". Set the Data type to Date. Leave the rest as default and click OK.
- Create a second parameter named "End Date". Set the Data type to Date. Click OK.
- Show both parameter controls on your worksheet so users can select dates.
Step 2: Add a Reference Band to the Axis
A reference band is simply a shaded area on your chart that spans between two points on an axis.
- Right-click the Date axis (your horizontal x-axis) on your line chart and select Add Reference Line.
- In the configuration window:
- Click OK.
Now you have a shaded region on your graph. When you adjust the dates in your "Start Date" and "End Date" parameters, the highlighted band will move dynamically, clearly marking the exact time frame you want to analyze.
Final Thoughts
Mastering these highlighting techniques transforms your line graphs from pretty pictures into powerful storytelling tools. By guiding your viewer's eye with a parameter-driven highlight, an interactive action, or a reference band, you can make your key insights incredibly clear and your dashboards much more professional.
While building these interactive dashboards in Tableau is a powerful skill, we know it involves a lot of clicks to set up parameters, write calculations, and configure actions. When my team needs answers quickly, without the manual setup, we use Graphed. We can just ask, "show me website traffic from last quarter and highlight the week of our Black Friday campaign," and get an interactive chart in seconds. It allows anyone on our team, regardless of their Tableau chops, to get insights instantly.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?