---
title: "Parameter Use: Zoom In/Out on Chart"
description: Have you ever needed to zoom in and out on a graph before? It’s a lot simpler than you may think. Megan explains how to add this feature to your dashboard.
image: https://godatadrive.com/hubfs/Imported_Blog_Media/ZoomParam.png
---

 1 min read

# Parameter Use: Zoom In/Out on Chart

[![Picture of Megan Lukonen](https://godatadrive.com/hubfs/Megan-L-Headshot.png) Megan Lukonen ](https://godatadrive.com/blog/author/meganlgodatadrive-com)  Jul 1, 2020

[Tableau](https://godatadrive.com/blog/tag/tableau) [Dashboard Development](https://godatadrive.com/blog/tag/dashboard-development) [How To...](https://godatadrive.com/blog/tag/how-to) [Data Science](https://godatadrive.com/blog/tag/data-science) [Human Centered Design](https://godatadrive.com/blog/tag/human-centered-design) [Helpful Resources](https://godatadrive.com/blog/tag/helpful-resources) [Design](https://godatadrive.com/blog/tag/design) [Data Visualization](https://godatadrive.com/blog/tag/data-visualization) [DataFam](https://godatadrive.com/blog/tag/datafam) [DataDrive](https://godatadrive.com/blog/tag/datadrive)

![Parameter Use: Zoom In/Out on Chart](https://godatadrive.com/hubfs/Imported_Blog_Media/ZoomParam.png)

Have you ever had the need to zoom in and zoom out on a chart? Have you needed to be able to see the intricate peaks and valleys, yet also see the big picture? 

![GIF of line chart](https://lh4.googleusercontent.com/B6QoBWj-r2SJk2jeunGlWiwEc_4_1Nf0wzVfecO19ghztNGAflKFjUPbPzJHZskSmbPu9EeXsE6HEgtwqIMtIBuRs2TQYHOaeOERD3sLj8jGTAJthKIqe2uCBVKNp0WbzTa3hyg)

In 5 simple steps, your users will have the ability to easily zoom in and out of your line charts.

 

---

## Step 1: Create Parameter

Create a string parameter using a list for allowable values.

The parameter will be how your users interact with the chart.

![Window to create parameter](https://lh4.googleusercontent.com/QM4rFECY68-0BqcNquaWqGicHFH4iVF_qITrFEFvmXr_WiN52sGH95gV0A6nIUFLRiv3StxbrjWpx2pW7nD3TjvN8DrkZWslSS_y-4tvfyAGQJrRyCSg5MqpRVGFHY8GhGvKnP0)

## Step 2: Create Calculation

This calculation will turn on and off the 0 axis once all 5 steps are completed.

**Graph View Calc**

CASE [Graph View]  

WHEN "FULL VIEW" THEN 0  

WHEN "DETAILED VIEW" THEN NULL  

END

## Step 3: Create Line Chart

Create your line chart as you typically would, but then drag Graph View Calc (created in step 2) onto the Detail marks card.

![Create Line Chart](https://lh6.googleusercontent.com/L1W1n3qlcK6IauATNmbIWziHa_DNMcsgk6AF4GA88yVenCalChRPv-6-oAcghhDOVAMxYoCLFCYu867qF9iwNPi2pYMexj4rSFKsN32M60BYA7VfKYTUqraWHeOJm8D7PAr9d_w)

## Step 4: Create Reference Line

Using the Analytics tab, drag “Reference Line” onto your chart. In the edit window, change the following:

- Change *line value *to SUM(Graph View Calc)
- Change *line label* to None
- Change *line tooltip* to None
- Change *formatting line *to None
  
  **We want this line to be invisible to the user!

![Window to create reference line](https://lh5.googleusercontent.com/zdeg3-11i-5B2dB5sIVrdwzdH5tqjugYUC9omJrv78jhipdcvBXVZafCVUiFQlLxswSt8kU2P4CL0DWSgznji878VAxBJ44tb8eTyrSMDHxuieMCvKkf_KQFKczm1eE3CKupgwc)

## Step 5: Final Step

The final and most important step to making this work: 

- Right click on your vertical axis and select Edit Axis. 
- Uncheck the box to Include Zero.  Our calculation from step 2 will tell the chart when and when not to include zero for us!

![Window to edit axis, do not include zero](https://lh5.googleusercontent.com/OSkgm4jfwCBNfs7uIISpuTe9KhXzecQgETOQ7c4KwXhHkpDY-5BY-R4XoBP7Kfy34pke5ft5528krDLkqCXA5VlwL7FDW2WHnbI_IR-5Hb9fC55UKiZ0V5HWp8WCix6KZ8KMfKY)

When you create your dashboard, make sure to show the parameter so that your users can take advantage of this cool new feature.

### *That’s it! 5 easy steps to give your users the ability to zoom in and out as needed.*

 

---

## Explore More

- [Tweet](https://twitter.com/share)

[![Tableau Conference 2025 | Know Before You Go](https://godatadrive.com/hubfs/DataDrive%20Blog%20Images%20(1)-2.gif) ](https://godatadrive.com/blog/tableau-conference-2025)

#### [Tableau Conference 2025 | Know Before You Go](https://godatadrive.com/blog/tableau-conference-2025)

![Picture of Luke Komiskey](https://godatadrive.com/hs-fs/hubfs/luke-1.png?width=30&name=luke-1.png) [Luke Komiskey](https://godatadrive.com/blog/author/luke-komiskey): Jan 20, 2025

If you’re a data enthusiast, analytics professional, or just someone curious about Tableau’s latest innovations, the Tableau Conference 2025 is your...

[Read More](https://godatadrive.com/blog/tableau-conference-2025)

[![What is Tableau+? | Is Tableau Plus Worth It?](https://godatadrive.com/hubfs/140.gif) ](https://godatadrive.com/blog/what-is-tableau-plus)

#### [What is Tableau+? | Is Tableau Plus Worth It?](https://godatadrive.com/blog/what-is-tableau-plus)

![Picture of Luke Komiskey](https://godatadrive.com/hs-fs/hubfs/luke-1.png?width=30&name=luke-1.png) [Luke Komiskey](https://godatadrive.com/blog/author/luke-komiskey): Aug 7, 2024

Tableau Plus is the new premium offering from Tableau, a leading data visualization and business intelligence platform. It builds upon the...

[Read More](https://godatadrive.com/blog/what-is-tableau-plus)

[![Cannot Mix Aggregate and Non-Aggregate | Tableau Error Message](https://godatadrive.com/hubfs/cannot%20mix%20aggregate%20non-aggregate.gif) ](https://godatadrive.com/blog/cannot-mix-aggregate-non-aggregate-error)

#### [Cannot Mix Aggregate and Non-Aggregate | Tableau Error Message](https://godatadrive.com/blog/cannot-mix-aggregate-non-aggregate-error)

![Picture of Luke Komiskey](https://godatadrive.com/hs-fs/hubfs/luke-1.png?width=30&name=luke-1.png) [Luke Komiskey](https://godatadrive.com/blog/author/luke-komiskey): Aug 5, 2024

If you've spent any time working with Tableau, you've likely encountered the dreaded "Cannot Mix Aggregate and Non-Aggregate Arguments" error. It's a...

[Read More](https://godatadrive.com/blog/cannot-mix-aggregate-non-aggregate-error)

```json
{
  "@context" : "https://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "Megan Lukonen",
    "url" : "https://godatadrive.com/blog/author/meganlgodatadrive-com"
  },
  "dateModified" : "2021-09-20T15:02:58.087Z",
  "datePublished" : "2020-07-01T15:20:33.000Z",
  "headline" : "Parameter Use: Zoom In/Out on Chart",
  "image" : [ "https://godatadrive.com/hubfs/Imported_Blog_Media/ZoomParam.png" ],
  "mainEntityOfPage" : {
    "@id" : "https://godatadrive.com/blog/2020/6/24/parameter-use-zoom-inout-on-chart",
    "@type" : "WebPage"
  },
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "url" : "https://godatadrive.com/hubfs/New%20Header%20NL-1.png"
    },
    "name" : "DataDrive"
  }
}
```