In this article:

How to Flip X and Y Axes in Your Chart in Google Sheets

May 8, 2024

It is possible to flip the  X and Y axes on certain charts. For our example, we have the following data and the resulting chart:

Original data and chart. The x-axis data and the y-axis data are flipped. 


We have switched the x and y axes in the data, which explains why we have the following chart. How can we switch the axes back to get the correct graph?


How to flip X and Y axes of the chart

In order to do this technique, we assume that you have added a header row to your data. Here are the steps:


Step 1: Double-click the chart. The Chart editor sidebar will appear. Click the Setup tab. The labels X-axis and Series should appear. 

Chart editor sidebar. Setup tab selected. 


Step 2: As you can see, Google Sheets automatically used the header rows as the names of the X-axis and Series. Underneath these labels are the options for selecting the X-axis (by its name, for x-axis) and the Series (for the y-axis). Click the shaded box below X-axis. Options will appear. Select the right option. For our case, “real x” should be the header for the X-axis.

X-axis options. The real data for x-axis highlighted.


Step 3: Do the same for the Series or the y-axis. For our case, “real y” should be in the Series. 

Series or y-axis options. The real data for y-axis highlighted.


Then you are done! Here is the original chart:

Original chart


The final chart:

Final chart. Note the switch in the ranges of the x-axis and y-axis after the switch. The axes labels need to be changed one-by-one.

As you can see, the values are now swapped to their right places. There is no need to modify the source sheet, so you can do it even if you cannot edit the source sheets!

Related Articles

-Add Title and Label Legend Google Sheets Chart

-Line of Best Fit Google Sheets

-Finding the Slope in Google Sheets

-Add Trendline Google Sheets

-Create a chart with Multiple Ranges of Data

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->