6.2 C
London
Thursday, December 19, 2024
HomeSoftware TutorialsGoogle SheetsHow to Add a Vertical Line to a Chart in Google Sheets

How to Add a Vertical Line to a Chart in Google Sheets

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

Occasionally you may want to add a vertical line to a chart in Google Sheets to represent a target line, an average line, or some other metric.

This tutorial provides a step-by-step example of how to to add a vertical line to the following line chart in Google Sheets:

add vertical line to chart in Google Sheets

Step 1: Enter the Data

Suppose we would like to create a line chart using the following dataset in Google Sheets:

Step 2: Add Data for Vertical Line

Now suppose we would like to add a vertical line located at x = 6 on the plot.

We can add in the following artificial (x, y) coordinates to the dataset:

Step 3: Create Line Chart with Vertical Line

Lastly, we can highlight the cells in the range A1:C13, then click the Insert tab along the top ribbon, then click Chart:

The following line chart will be automatically be created:

Notice that the vertical line is located at x = 6, which we specified at the end of our original dataset.

The vertical line ranges from y = 0 to y =25, which we also specified in our original dataset.

To change the height of the line, simply change the y-values to use whatever starting and ending points you’d like.

Step 4: Customize the Chart (Optional)

Feel free to double click on the vertical line to customize the color and style to make it more aesthetically pleasing:

add vertical line to chart in Google Sheets

Additional Resources

The following tutorials explain how to perform other common operations in Google Sheets:

How to Add Error Bars to Charts in Google Sheets
How to Add Trendline to Chart in Google Sheets
How to Add Labels to Scatterplot Points in Google Sheets

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories