How to Rotate Data Labels in Excel Graph: 6 Best Ways

Are you wondering how to accommodate long axis and data labels in an Excel chart by rotating the angle of the text? You’ve reached the right resource!

Unlocking the power of data visualization is essential for effective communication in Excel. While graphs provide a visual representation of data, the positioning of data and axis labels improve readability and comprehension.

One crucial customization feature is the ability to rotate data and axis labels in an Excel graph. By rotating data labels, you can enhance clarity, emphasize key insights, and optimize the presentation of your chart.

In this tutorial, you’ll explore various methods to rotate data labels in Excel graphs. Let’s get started!

Why You Must Rotate Data Labels in Excel

  • Rotating data labels can prevent overcrowding and overlapping. Further, making the chart and its data easier to read and interpret.
  • By rotating specific data labels, you can draw attention to important or noteworthy data points, guiding the reader’s focus and emphasizing key insights.
  • Rotating data labels is also useful when dealing with long label text that would otherwise exceed the available space. Rotating text allows you to utilize the vertical space and display the text without truncating it.
  • Data and axis label rotation on an Excel graph also add a modern look to the content.
  • In some cases, rotating data labels to match the orientation of the chart elements, such as bars or lines, can enhance the overall visual coherence and harmony of the graph.

So, now you know why you must rotate the axis and data labels in Excel when the text exceeds the horizontal space available for labeling. Now, find below some easy methods you can try:

Rotate Data Labels in Excel Using Format Axis

The Format Axis tool shall show up when you select the X-axis (horizontal axis) or Y-axis (vertical axis) and right-click. It provides various customization options on the right-side navigation panel on your worksheet.

One such customization is the Text Options menu. There, you’ll find various ways to change the angle or position of axis labels. Here are the steps you can try:

Format axis option in Excel graph
Format axis option in Excel graph
  1. Go to the chart on which you need to modify the axis label angle.
  2. Select and right-click on any of the axis labels.
  3. Click the Format Axis option on the context menu that shows up.
Format Axis Textoptions Textbox in Excel
Format Axis Textoptions Textbox in Excel
  1. Format Axis navigation panel should show up on the right side of the screen.
  2. Click Text Options.
  3. There, select the third option which is Textbox.
  4. Now, there are two options to rotate the texts and these are as below:
    • Text direction: Horizontal, Rotate all text 90°, Rotate all text 270°, and Stacked.
    • Custom angle: Enter any integer between 0 and 90, or -0 to -90.
Rotate axis labels in Excel using Custom angle
Rotate axis labels in Excel using Custom angle

That’s it! You’ll see the changes immediately on the Excel chart or graph you selected. This method will only work for the X-axis and Y-axis data labels on an Excel graph.

Note: The shortcut key to go directly to the Format Axis navigation panel after selecting the axis label is Ctrl + 1.

Rotate Data Labels Using Format Data Labels

Suppose you need to add the values of graph coordinates on the Series. Series are the elements that create the actual visualization on a graph by transforming the values of cells into graph coordinates. You can see them as columns in a bar chart, lines in a line chart, or scattered dots in a scatter chart.

If you already created a chart but don’t see the data labels on the Series, here’s how you can add data labels:

Activating data labels in Excel
Activating data labels in Excel
  1. Highlight the chart and click on the plus (+) or Chart elements icon.
  2. Click the Data Labels overflow menu arrow and choose a position for the Series data labels from the following options:
    • Center
    • Inside End
    • Inside Base
    • Outside End
    • Data Callout
  3. Let’s choose Outside End in the current tutorial.

As you can see in the above example, the data label values show up horizontally. Since there is enough space for dollar figures, you can see the points easily.

However, if the dollar value increases, the data labels could overlap each other. You can see an example below:

Data labels overlapping in an Excel bar chart
Data labels overlapping in an Excel bar chart

In the above scenario, you must change the rotation angle of the data labels of the Series so the values show up clearly. Find below a step-by-step guide to fix the overlapping data labels:

Format data labels in Excel graph
Format data labels in Excel graph
  1. Click on any of the Series data labels and Excel will highlight all of them.
  2. Right-click and select the Format Data Labels option on the context menu you can see.
Rotate data labels in Excel graph using Text direction
Rotate data labels in an Excel graph using the Text direction
  1. The Format Data Labels navigation panel will show up.
  2. There, click Text Options.
  3. From the three text options choose the last one, that is, Textbox.
  4. Now, click the Text direction drop down list and choose Rotate all text 270°. The data label values will show up vertically.
Rotate data labels using custom angle
Rotate data labels using custom angle
  1. Alternatively, you can enter any integer value between 0 to 90 in the Custom angle box. For example, 45.

Perfect! You’ve successfully rotated the data labels in an Excel graph.

Note: The shortcut key to go directly to the Format Data Labels navigation panel after selecting the data label is Ctrl + 1.

Change Text Direction or Angle From Format Chart Title

Your Excel chart could also contain chart titles and axis titles. If you need to rotate the text for these labels, follow these steps:

Format chart title on Excel
Format chart title in Excel
  1. Click the chart title on the graph.
  2. Right-click and choose the Format Chart Title option.
Rotate chart title text using custom angle
Rotate chart title text using custom angle
  1. On the Format Chart Title navigation panel, click Text Options.
  2. There should be three text options. Click on the last one, the Textbox.
  3. Now you can use either the Text direction option or the Custom angle box to rotate the text.

For axis titles on the X or Y axes, you can right-click on them and choose the Format Axis Title option and follow the steps mentioned above. This is how you can customize the text angle of the axis titles on an Excel graph.

Note: The shortcut key to go directly to the Format Chart Title navigation panel after selecting the chart label is Ctrl + 1.

Rotate Data labels in Excel Chart Using Orientation

This method is compatible with any selectable text or text boxes in an Excel graph. Here’s how you can try it on your own:

Rotate data labels in Excel using the Orientation button
Rotate data labels in Excel using the Orientation button
  1. Click any data label on the Excel graph to highlight all.
  2. Go to the Home tab on the Excel ribbon.
  3. On the Home tab, find and click the Orientation button inside the Alignment commands block.
  4. You can choose from any of the following options:
    • Vertical Text
    • Rotate Text Up
    • Rotate Text Down

The above method is also applicable to Excel graph chart titles, axis titles, and axis labels.

Manually Rotating Data Labels in Excel Graph

In all the above methods, you can change the orientation or angle of the labels of the whole group, like all texts of Series data labels or axis labels. If you’re wondering how to use different text angles for different labels in an Excel graph, I’ve got a quick solution for you. Follow the steps outlined below:

Manually changing text rotation of data labels
Manually changing text rotation of data labels
  1. Select one data label on your chart.
  2. Excel will highlight all the labels automatically.
  3. Now, select the target data label again.
  4. This time, Excel will only highlight the selected data label.
  5. Now, go to Format Data Label > Text Options > Textbox.
  6. There, use the Custom angle box to enter a positive or negative angle between 0 to 90.

You should now see that only the selected data label has changed its orientation. You can follow this method also for axis labels on the X and Y axes.

How to Rotate Data Labels in an Excel Graph Using Excel VBA

Are you an Expert Excel user with ample knowledge of the Excel VBA program? Then you must love this method of automating the axis and data labels in an Excel chart.

Find below the code as well as the steps you need to try:

Open VBA Editor in Excel
Open VBA Editor in Excel
  1. Open the Excel VBA Editor interface by clicking the Developer tab and then Visual Basic inside the Code commands block on the Excel ribbon.
Creating and saving Excel VBA script
Creating and saving Excel VBA script
  1. On the Excel VBA Editor interface, click the Insert button and choose Module.
  2. Copy and paste the following VBA script inside the newly created blank module:
Sub ChangeTextAngle()
    Dim cht As ChartObject
    Dim xAxis As axis
    Dim yAxis As axis
    Dim series As series
    Dim dl As DataLabel
    
    ' Change the chart name as per your worksheet
    Set cht = ActiveSheet.ChartObjects("Chart 2")
    
    ' Change the angle for X-axis labels
    Set xAxis = cht.Chart.Axes(xlCategory)
    xAxis.TickLabels.Orientation = 20
    
    ' Change the angle for Y-axis labels
    Set yAxis = cht.Chart.Axes(xlValue)
    yAxis.TickLabels.Orientation = 0
    
    ' Change the angle for data labels
    For Each series In cht.Chart.SeriesCollection
        For Each dl In series.DataLabels
            dl.Orientation = 20
        Next dl
    Next series
End Sub
  1. Click the Save button and hit Yes on the warning message that pops up.
  2. Close the VBA Editor.
Rotate data labels in Excel graph using Excel VBA
Rotate data labels in Excel graph using Excel VBA
  1. Hit Alt + F8 to bring up the Macro dialog box.
  2. There, select the ChangeTextAngle macro and click Run.

Excel should automatically change the orientation of the text labels for Series data labels and Y-axis labels by positive 20°.

In the above VBA script, you must modify the chart name according to your own worksheet. Select the chart in question and look at the leftmost box of the Excel formula bar. There, you should find the chart name, like Chart 1, Chart 2, etc.

How to find chart number in Excel
How to find chart numbers in Excel

Once you know the chart name, modify the code element ActiveSheet.ChartObjects("Chart 2").

To change the text angles, modify the values for the following code elements using positive or negative integers of 0 to 90:

  • xAxis.TickLabels.Orientation = 20 (for X-axis or horizontal axis)
  • yAxis.TickLabels.Orientation = 0 (for Y-axis or vertical axis)
  • dl.Orientation = 20 (for Series data labels)

Conclusion

By following the various methods outlined in this Excel tutorial article, you can easily customize the orientation of data labels to improve readability, highlight key insights, and accommodate lengthy text. This also enhances the overall aesthetics of your charts.

Whether you’re presenting data to colleagues, clients, or stakeholders, the ability to rotate data labels empowers you to effectively communicate your message. You ensure that your audience grasps the essential information with ease.

Take advantage of these techniques and unlock the full potential of your Excel graphs by confidently rotating data labels to optimize your data presentation.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *