Excel Books

Books that I own and use while developing in Excel

Excel User Conference

2008 US East Coast Excel User Conference
September 24-27, 2008
Atlantic City, NJ

 

Axis Label Cut Off

The Problem

Under certain conditions, the text of a vertically aligned axis title may be cut off, so it loses the end of the title. This label truncation may be as little as a pixel or two, or as much as several characters. Under more rare occasions, the problem is also experienced by vertically oriented textboxes or data labels. The title text is truncated in on-screen displays, and when the screen display is exported (a chart exported as an image file, or pasted into another application). The problem usually disappears in Print Preview, and Printouts rarely show the title truncation.

Axis titles in Excel charts cannot be resized, so users who try to change the shape of the false textbox outline of the title feel helpless to deal with the problem.

The problem has been reported in versions of Excel from at least as early as 97 (and probably 5/95) to 2003. I have yet to hear of an issue with Excel 2007, and presumably with charts in 2007 being built from new Office Art constituents the problem will no longer occur. The problem has also been reported in Microsoft Graph charts in PowerPoint. It has been an issue since Windows 95 or earlier, and persists through Windows XP SP2. It occurs on all combinations of PC and monitor, but seems more prevalent in laptops.

This is an intermittent and unpredictable problem which seems related to video drivers, monitor resolution settings, window zoom, and font properties. Perhaps there is an influence from phase of the moon and orbits of the planets. There are several contributing factors, listed in rough order of frequency of apparent causality:

  • The problem appears at certain screen resolution settings.
  • The problem appears at some window zoom settings.
  • Certain fonts and font sizes are more susceptible.
  • The same file will not experience the problem on all monitors or all computers.
  • The length of the title text may affect the occurrence of the problem.
  • Setting auto font scaling may change the incidence of the problem.
  • The chart's location (embedded vs. standalone sheet) may change susceptibility.
  • Perhaps it has something to do with file or chart corruption.
The Solution

As of this writing, there is no known solution. There are a number of somewhat effective workarounds, which I've listed in what I consider an increasing level of pain.

Adjusting Window Zoom
When I recommended that a colleague stop using 150% zoom, his problem went away (in his case, it occurred only at 139% and higher zoom). It's best for several other reasons to stick to 100%.

Tweaking Font Settings
"Fixing" the problem may be as easy as changing the font from Arial to Helvetica, or font size from 12 to 11.5 points.

Changing Title Orientation
This option depends on the overall layout of the chart. Horizontal titles have not been implicated in this truncation problem. In fact, horizontal text elements are much easier to read, and using them is one of the rarely-followed charting best practices. You should consider rotating the vertically-oriented title and perhaps moving it above the top of the axis.

In some cases, it may be possible to keep the vertical alignment of the axis title and still eliminate or reduce the truncation, by left-justifying the text within the title.

Appending Characters
Another workaround is to type several spaces followed by a non-breaking space (hold Alt and type 0160 on the numeric keypad) to extend the length of the box that contains the text. The regular spaces do nothing to stretch the text box, but adding another character forces Excel to recalculate the new size. This works by adding empty space to the title, to be truncated instead of meaningful characters. A previous version of this workaround called for several spaces and a character such as a period. The period would appear on a computer which wasn't experiencing the truncation phenomenon, so it would have to be formatted in a color that matched the chart background. Thanks to Andy Pope who suggested using the non-breaking space instead.

Replacing Title with TextBox
Textboxes and other shapes are rarely associated with the text truncation issue. You could remove the regular axis title and add a textbox to the chart. Textboxes are more readily formatted than built-in chart text elements, so this offers additional options to the chart designer.

Changing Monitor Settings
In Microsoft Knowledge Base article The 'Y' axis label of your chart is truncated in Excel for Windows, Microsoft implicates high monitor resolutions and aspect ratios that deviate from 4:3 (although the problem has existed in lower resolutions and 4:3 aspect ratios before the newer screens became available), and suggests:

To work around this issue, set your display settings to a lower screen resolution. You must try and select a resolution that has a width to height ratio of 4:3. For example, the following steps show you how to change your display settings from a screen resolution of 1280x720 pixels to a screen resolution of 1024x768 pixels.

This is a partially effective workaround, in that it usually works, if you feel like changing your monitor settings. One user has suggested changing monitor resolutions as above, then opening Excel and the workbook with troublesome charts, then changing the resolution back to your desired settings. The resolution must be reset before each time Excel is started.