Master Excel with my tips, tricks & tools!
Subscribe to my free email newsletter
& receive a Free Gift!

Move and Align Chart Titles, Labels, Legends with the Arrow Keys

The free Chart Alignment Add-in for Excel allows you to quickly align the objects within a chart.  The chart titles, labels, and legends can be moved using the arrow keys on the keyboard or with the alignment buttons in the add-in window.

Video

The Problem

When chart objects/elements (titles, labels, legends) are added to a chart they are positioned in a default location.  For example, the chart title is centered over the top of the chart by default.  If you want to put the title in the top left corner of the chart, it can only be moved by left-clicking and holding with the mouse, then dragging and dropping to the desired location.

Cannot move Excel Chart Objects Elements with Arrow Keys

There is no built-in way to move the chart title with the arrow keys, or align it to other positions within the chart (top-left corner for example).   The entire chart can be moved with the arrow keys, but the elements inside the chart cannot.

*Note: Starting in Excel 2013 the chart objects (titles, labels, legends, etc.) are referred to as chart elements, so I will refer to them as elements throughout this article.

The Solution

The Chart Alignment Add-in is a free tool (download below) that allows you to align the chart elements using the arrow keys on the keyboard or alignment buttons on the add-in window.  This makes it very easy to quickly nudge and align the chart objects in your chart to improve the look of the chart from the default settings.

Chart Alignment Add-in Window 1.1

Feature #1: Arrow Keys

The arrow keys on the keyboard can be used to nudge any of the chart elements in any direction.  There is an increment setting that allows you to move the chart element a specific number of points each time an arrow key is pressed.  Any of the chart elements (chart titles, axis titles, data labels, plot area, and legend) can me moved using the arrow keys.

Move Chart Elements Objects with Arrow Keys

Feature #2: Alignment Buttons

The add-in window contains a set of alignment buttons that align the chart elements to the border of the chart when pressed.  For example, if you want to align the chart title to the top left corner of the chart, simply select the chart title then press the top-left arrow button on the add-in window.

Align Chart Titles to Top Left Corner

The margin setting allows you to set the margin to a specific number of points that will offset the chart element from the chart border.  Please see the video for more details.

Why Move the Chart Titles and Labels?

The goal of any chart is to clearly communicate a story about your data.  The reader should be able to understand the message you are trying to convey within a few seconds of looking at the chart.  There is a lot of great information about this topic and I will post some links at the bottom for further reading.

The default settings for Excel charts don’t always apply to some of these theories of reducing chart junk and keeping it simple.  This requires you to modify the chart layout, especially the chart elements.  The Chart Alignment add-in helps make this process faster and gives your charts a more standardized and professional look.  For example, every single chart you produce in the future can have a chart title that is offset 5 points from the top-left corner of the chart border.  This will save you time and take out some of the guess work with arranging the elements.

Guide

The add-in is compatible with Excel 2007, 2010, and 2013 for Windows.

After you have installed the add-in, the Align Objects button will appear on the right side of the Format tab in the Chart Tools design tab of the ribbon.  This is a contextual tab and will only appear when you have a chart selected.

Chart Alignment Add-in Button

Clicking on the Align Objects button will open the add-in window.  The window contains two main features: Move Objects with Arrow Keys and Alignment Buttons.

Feature #1: Move Objects with Arrow Keys

To move the elements inside the chart with the arrow keys:

  1. Select the element in the chart you want to move (title, data labels, legend, plot area).
  2. On the add-in window press the “Move Selected Object with Arrow Keys” button.  This is a toggle button and you want to press it down to turn on the arrow keys.
    Chart Alignment Arrow Keys Toggle On 1.1
  3. Press any of the arrow keys on the keyboard to move the chart element.

Note: The add-in window must be active for the arrow keys to work.  When you select a different element in the chart, you must then click on the add-in window to activate it, then use the arrow keys.

When all the data labels in a series are selected you can use the arrow keys to move all the labels at the same time.  Please see the video for further details on this.

The Increment amount allows you to set a specific number of points to move the element with the arrow key is pressed.  The greater the number, the more distance the element will move when the arrow key is pressed.  The “Move Selected Object with Arrow Keys” must be toggled off to change the increment.

Feature #2: Alignment Buttons

The alignment buttons move the selected chart element to a specific location along the charts inner border.

To use the alignment buttons:

  1. Select an element inside the chart (title, legend, plot area).
  2. Press one of the alignment buttons to move the selected element to the desired location.Chart Alignment Buttons 1.1

The Margin amount allows you to set an amount to offset the element from the border.

Note: In Excel 2007 the center alignment buttons do not place the element in the exact center of the chart.  This is a limitation of the 2007 VBA object model, and I’m working on an alternate solution.

Download

zip iconChart Alignment Add-in.zip

Compatible with Excel 2007, 2010, 2013 for Windows.  The zip file contains the add-in file (EC_Chart_Alignment.xlam) and installation guide (Installing an Excel Add-in.pdf)

Update Instructions: If you have already installed the add-in and want to install an updated version:

  1. Close Excel.
  2. Open the folder location where you originally placed the add-in file (EC_Chart_Alignment.xlam).
  3. Replace the existing add-in file with the new one.
  4. Open Excel.

Please leave a comment below with any questions, issues, and ideas for improvement.

This add-in will be updated with feature requests.  Please subscribe to the free email newsletter to stay updated.

Update Log

Version 1.1

  • Align Objects button now appears on the Format tab of the PivotChart Tools Design Ribbon and works with PivotCharts.
  • Alignment buttons work when multiple labels are selected.
  • Arrow keys and alignment buttons now work with shapes placed inside the chart.
  • Fixed error: Now works on multiple labels when one or more labels have been deleted from the group.

Additional Resources

30 Chants for Better Excel Charts - Mynda Tracey at MyOnlineTrainingHub shares 30 great tips for creating better charts to help communicate your story effectively.

9 Steps to Simpler Chart Formatting and Charting Dos and Don’ts – Jon Peltier at Peltier Tech is the absolute legend when it comes to Excel charts.  If you have a question about creating a chart, he probably has an article that answers it.

5 simple rules for making awesome column charts - Chandoo at Chandoo.org explains how to improve your column charts and has lots of other great articles on chart formatting.

quick tip: left uppermost align title text - This is a great short article from Cole Nussbaumer at Storytelling with Data that explains why your chart titles should be aligned in the top left corner of the chart.  Definitely an inspiration for this add-in.

Also checkout the blogs and writings of Edward Tufte and Stephen Few for some great theory about communicating your data.

Training Course – If you are looking for a full length training course on charts, I highly recommend the dashboard course from My Online Training Hub.  I have taken this course and it really helped me improve my charting skills.  Checkout my video review of the course to learn more about it.

Have you read a great article about charts recently?  Share the link in the comments section below.

Please share this post:
facebooktwittergoogle_pluslinkedinmail
Come Learn Excel With Us (it's Free!)

Learn 10 great Excel techniques that will wow your boss and make your co-workers say, "hey, how did you do that?"

You will also received email updates with new blog posts and videos to help you save time everyday and learn Excel.

CLICK HERE TO DOWNLOAD MY FREE EBOOK

20 Responses to Move and Align Chart Titles, Labels, Legends with the Arrow Keys

  1. Pretty cool! First time through it looks solid.

    BTW, chart elements have been referred to as such since at least Excel 5.

  2. Mynda says:

    Love it. Thanks Jon.

    I could have done with this yesterday while wrangling some uncooperative labels into place.

    Can’t wait to share it with my Dashboard course students.

    • Jon says:

      Awesome! I find myself using it quite a bit and it comes in real handy for moving labels.

      Let me know what your students think and if they have any suggestions for improvement.

      Thanks Mynda!

  3. Greg Harisiades says:

    Jon,
    Definitely a nice Addin…

    I find myself using PivotCharts quite a bit. Does this work with that flavor of charts?

    • Jon says:

      Hi Greg,
      Great question! It does work with PivotCharts, however the add-in needs to be updated to display the “Align Objects” button on the Format tab of the PivotChart Tools design tab. I will update the add-in and let you know when it is available.

      Thanks!
      Jon

  4. Jeff Weir says:

    Looks good. What would be even handier is if you could move multiple things…whether or not they are the same kind of object (e.g. data labels and chart title).
    I note this won’t let you move all data labels belonging to a series at once. It will let you move one data label if you click on it twice (the first click selects all the data labels for the series, the 2nd selects the specific data label you clicked on)

    But if you select a data label by clicking on it once, then the addin will tell you either give a run-time error “Invalid Parameter” or will say “Data Labels cannot be moved with these buttons”, depending on whether “Move selected object with arrow keys” is toggled or not.

    • Jeff -
      The data labels can’t be moved with the “Alignment Buttons”, but these let you position an object in any of the nin positions in the chart (top left, top center, top right, etc.). I guess you wouldn’t want all data labels located in the same position; the program makes you select one at a time, so you can see how silly it looks.
      You can, however, move all data labels in a series as a group using the keyboard arrow keys.

    • Jon says:

      @Jon Peltier – Thank you for the explanation!

      @Jeff Weir – Jon’s explanation is correct for the current functionality of the add-in. It sounds like you might be getting an error though. What type of chart are you testing this on? I read your recent article on the customer segmentation chart and know you are doing some advanced charting. So it may be an issue with the chart type. You can also send me your file jon@excelcampus.com. I would like to get any errors fixed.

      I’m going to release an update to the add-in soon that will include new functionality to move the data labels as a group with the alignment buttons. Mynda had a great suggestion and example where this could be useful, and I will share more details with that release.

      There will also be a feature to extend the arrow key and alignment button functionality to shapes (text boxes, lines, etc.) that reside inside the chart. I will provide more details on that as well. This is a great feature and resolves the issues of placing a shape outside and on top of a chart to retain arrow key functionality.

      For those reading, please subscribe to the email newsletter to be notified of this updated release.

      Thanks again to everyone!

      • Jeff Weir says:

        Ok, the scenario where I get the errors is when you have a chart with a series with the values of 1,2,3 but only one of the points has a data label, and you have clicked on that data label ONCE (which to Excel means you have selected ALL data labels) and not TWICE (which to Excel means you have selected the individual data label).

        I’m not a fan of the use of toggle button. I initially didn’t realise it was in fact a toggle button, and thought it was just a text box message…which didn’t make sense.

        I would suggest you instead use radio buttons with the options worded as explicitly as possible:
        * Move selected element by this many points using arrow keys:
        Increment (pts) ___
        * Move selected element to edge of chart, less this margin:
        Margin (pts) ___

        • Jon says:

          Thanks for the clarification on the error! I appreciate that and will get it fixed in the next release.

          The magic of the arrow keys lies in the toggle button so I am reluctant to change it. All the other controls need to be disabled when the arrow keys are enabled, and the toggle works great for this. However, I agree that the labels might not make sense and the next release will be more descriptive.

          Thanks again, I really appreciate the feedback!

  5. “…the labels might not make sense…”

    One of the hardest parts of UI design is making something that’s perfectly clear to yourself also clear to the user.

  6. zengkui guo says:

    Hi Jon, I remember your pic posted on EC. so nice that I do not have remember your name. Remembering pic is much easier.
    Anyway, a nice add-in, thanks for the update. But, another issue: Excel 2003 allowed me to glue 2 or more charts together using GROUP command. Then I can copy or cut the whole thing that includes all the GROUPED charts to somewhere else. Sadly this function is no long with 2013. What is the way to do it with 2013? Thanks.

    • That feature has never been removed. Select the charts you want to group, right click, choose Group from the pop up menu, choose Group from the selections, and the charts are grouped.

      • Jon says:

        Thanks Jon!

        Hi Zengkui, I am glad you remembered my pic. :)

        Were you able to group your charts in 2013? Jon is correct. The feature is still available. You can also group the charts using the Group button on the Format tab of the ribbon. The Format tab will appear when a chart or shape is selected, and the Group button will be enabled when two or more charts/shapes are selected.

        To select multiple charts/shapes you must hold down the Ctrl or Shift key while left-clicking on the object.

        Let us know if you have any questions.

  7. […] I played with Jon Acampora’s tool to Move and Align Chart Titles, Labels, Legends with the Arrow Keys, I dusted off and finished my own arrow key positioning device and added a resizing function. […]

  8. Amanda says:

    Fans from China. Everytime I make a graph, I need to adjust all the elements to the left side one by one, and make them alighn, thanks for the tool, u just totally release my hands.

  9. zhang John says:

    Thanks Jon from China.
    I found the article from a chinese website
    “http://excelpro.blog.sohu.com/303863138.html”
    and I did try to download the tool and learn it. But I cann’t open it. The Compression software is always informing me that the zip is broken.
    Can you check it out? or send a correct one to my email-zhangzhengy@ghac.cn.

    Thanks a lot.

  10. Alexandra says:

    Hi Jon, The add-in looks great. Could be even better if it was able to move groups of data labels to the sides of the bars. May be I just do not know of such a possibility. If you do, please share your knowledge.
    Thank you!

Please leave a comment