How to Change Order of Stacked Bar Chart in Excel

Cody Schneider7 min read

Building a stacked bar chart in Excel is straightforward, but its default sorting order can feel backward. Your data series might appear upside down, and the categories might be in the reverse order you intended. This quick tutorial explains how to easily change the order of both the stacked segments (series) and the bars themselves (categories) to tell your data's story precisely the way you want.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Understanding Excel's Default Charting Logic

Before fixing the order, it helps to understand why Excel arranges your stacked bar chart the way it does. This isn't a bug, it's just a specific, methodical process that might not align with your expectations. Typically, Excel's logic follows two rules:

  1. Series Order (The Stacks): Excel plots the first data series in your table (the first column or row of values) as the bottom segment of the stack. The last series in your data table becomes the top segment.
  2. Category Order (The Bars): Excel plots categories (the labels for each bar) from top to bottom. The first category in your table appears as the topmost bar in the chart, and so on.

Let's look at a common example. Imagine you have this simple data table showing product sales across three regions:

Sample Data:

When you create a standard stacked bar chart from this data, Excel produces a chart where:

  • "Product A Sales" is the bottom segment of each bar because it's the first data column.
  • "Product C Sales" is the top segment because it's the last data column.
  • The "North" region is the top bar on the chart because it's the first data row.

This may not be ideal. What if you want to feature "Product C" at the base of the bar for comparison or want to show the "West" region's sales at the top of the chart? Thankfully, you don't have to rearrange your source data to fix this. You can adjust it directly within the chart settings.

Part 1: How to Change the Order of the Stacked Segments (Series)

The most common frustration is getting the segments within each bar - the "stacks" - to appear in the desired order. Reordering your data columns in the spreadsheet is a clumsy workaround. The proper method is using the Select Data Source menu, which gives you full control over the layering of your series.

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Step-by-Step Guide to Reordering Chart Series

Step 1: Open the Select Data Source Menu

Right-click anywhere on your chart area and choose "Select Data..." from the context menu. This will open the Select Data Source dialog box, which is the control center for your chart's data.

Step 2: Locate the Legend Entries (Series) Box

In the dialog box, you'll see a panel on the left labeled "Legend Entries (Series)." This list shows all the data series being plotted in your chart's stacks. The order of items in this list directly corresponds to the stacking in your chart: the top item in the list is the bottom segment of the stack, and the bottom item in the list is the top segment.

Step 3: Reorder Your Series

This is where you make the change. Select any series in the list you want to move. Use the small Up and Down arrows next to the list box to change its position.

  • To move a segment higher up the stack on your chart, move it down in the list.
  • To move a segment lower down the stack, move it up in the list.

In our example, the list shows "Product A Sales" at the top and "Product C Sales" at the bottom. If we want "Product A Sales" to be the top segment of the bar and "Product C Sales" to be the bottom segment, we need to reverse this order. We would select "Product A Sales" and use the Down arrow to move it to the bottom of the list and repeat for other series until they are in the desired order.

Step 4: Click 'OK' to Apply Your Changes

Once you are happy with the order in the list, click the "OK" button. Your chart will instantly update, reflecting the new stacking order you just defined.

GraphedGraphed

Your AI Data Analyst to Create Live Dashboards

Connect your data sources and let AI build beautiful, real-time dashboards for you in seconds.

Watch Graphed demo video

Part 2: How to Change the Order of the Bars (Categories)

The second common adjustment is changing the order of the bars themselves. In a horizontal stacked bar chart, these are the categories listed on the vertical (Y-axis). By default, Excel places the first category from your data table at the top of the chart. For data that's chronological (like months or years) or ranked, you often want the reverse.

Fixing this is even easier and involves formatting the chart's axis.

Step-by-Step Guide to Reversing Category Order

Step 1: Select and Format the Category Axis

Right-click on the category axis labels (the text listing "North," "East," and "West" in our example). From the context menu that appears, choose "Format Axis..."

Step 2: Find the "Categories in reverse order" Option

A Format Axis pane will slide out on the right side of your Excel window. Ensure the "Axis Options" tab (the icon that looks like a bar chart) is selected. Look for a checkbox labeled "Categories in reverse order."

Step 3: Check the Box

Simply click the checkbox. As soon as you check it, your chart will update, and the order of the bars will flip vertically. The last category in your data table will now appear at the top, and the first will appear at the bottom.

A Quick Note on Axis Position: When you reverse the categories, Excel automatically moves the horizontal (value) axis from the bottom of the chart to the top to match. If you prefer it at the bottom, stay in the Format Axis pane and look for the "Horizontal axis crosses" option under Axis Position. Change it from "Automatic" to "At maximum category."

Free PDF Guide

AI for Data Analysis Crash Course

Learn how to get AI to do data analysis for you — the best tools, prompts, and workflows to go from raw data to insights without writing a single line of code.

Best Practices for Ordering Stacked Bar Charts

Now that you know how to control the order, here are a few tips to make your charts more effective.

1. Order Logically

  • Rank by Importance: Place the most important or largest segment at the base (bottom) of the stack. Our brains use the baseline for comparison, so this gives the most prominent segment a stable foundation.
  • Group Related Categories: If you have "Positive," "Neutral," and "Negative" survey responses, keep them in that logical order.
  • Chronological Order: For time-series data, decide if you want the earliest or latest period at the top and apply the axis reversal accordingly.

2. Keep it Simple

Stacked bar charts become difficult to read with too many segments. Try to limit each bar to 3-5 segments at most. If you have more, consider grouping smaller categories into an "Other" segment. The main purpose of a stacked bar chart is to compare totals across categories and see the rough composition of each total bar - it's not for precise comparison between individual segments of different bars.

3. Use Color Effectively

Order and color go hand in hand. Use color to draw attention or show relationships.

  • Sequential Colors: Use shades of the same color (from light to dark) to show progression or intensity.
  • Diverging Colors: Use two contrasting colors with a neutral color in the middle to show a positive-to-negative range.
  • Highlighting: Use a single bright color for the segment you want your audience to focus on and muted colors (like gray) for everything else.

Final Thoughts

Mastering the order of elements in an Excel stacked bar chart is a small skill that has a big impact on clarity. By using the 'Select Data' window to rearrange your series and the 'Format Axis' pane to flip categories, you gain complete control over how your data is presented, ensuring your chart is intuitive and easy to understand.

While tweaking charts in Excel is totally doable, the process often involves a lot of clicks, menus, and manual formatting. We designed Graphed to remove this friction by connecting directly to your data sources and building reports with simple requests. You can just ask something like, "build a stacked bar chart of sales by region and product, and make sure Product A is on top," and our AI will create a perfectly ordered, real-time chart for you in seconds. It allows you to focus on the insights, not on finding the right menu option.

Related Articles