Ask A Cartographer

Legend labels on two lines

August 13 2008 | 2 comments
Categories: Page Layout

On occasions, I have had some quite long labels (typically Australian aboriginal words) appearing in my legend. Is there some way of forcing the labels onto two (or even three) lines in the legend, so the whole legend box doesn't take up so much space width-wise, and (along with that) where there are two columns, they are more even?

Mapping Center Answer:

Unfortunately the New Line character is not a valid character in the TOC, which the basis for the legend in ArcMap. Here's a workaround:

  1. Copy your legend and right-click on the copy and Convert it to Graphics.
  2. Ungroup the elements in the result graphics until you can delete the unneeded graphics
  3. Create a new Rectangle Text element (which is using the paragraph text element).
  4. Copy the and paste the text from the legend text graphics and paste the text into the rectangle text element. Once you're done delete the text elements that had the old labels in them.
  5. Resize the Rectangle text element, which will automatically cause line wrapping to occur if a text line is longer than the element's width
  6. In the properties of the rectangle text element, on the frame tab, change the background to be white (or the color of your map), and set the outline to none.
  7. Position that over the text in your original legend, and edit that legend's properties to set up spacing (on the Legend tab) for the patches (vertically) to accomodate your multi-line labels.

That will in some cases allow you to have a legend where the symbols are still live linked to the TOC, but you'll have to manage the labels.   You may also need to create an extra white polygon graphic to cover up the rest of the original legend's labels.

Another Option posted by Aaron Sims on Jun 5 2009 3:54PM
I have run into this problem various times in the past and have come up with a work around of my own in which you may find useful. It involves what I like to call dummy layers, which are layers created using ArcCatalog that do not have any data associated to them.

1. Create a "dummy layer" (open ArcCatalog, right click in the appropriate folder location of your choice, and select create new layer). Choose it as a point, polyline, or polygon, it does not matter. Name it appropriately and don't worry about the projection (unless you wish to avoid receiving annoying messages from ArcMap every time you add the layer or start editing).

2. Go to your current project with long legend text and add the dummy layer.

3. Remove all outlines and fill colors of the dummy layer

4. Remove end text of your lengthy layer name until you reach the width you desire.

5. Enter the end text you removed in step 4 as the name of the dummy layer.

6. In the legend, place the dummy layer directly underneath the layer in which you removed text from.

7. If you need a third, fourth line, etc., add the dummy layer to the project again and proceed through the steps once more until you achieve the full length of desired text.

The problem I have with this method is the spacing between the legend items. To make it look more appealing, you may want to indent the extra text simply by providing a few blank spaces before text in the dummy variables.

Yet another work around for text spacing is to create multiple legends with dummy variables as needed.

1. Insert a new legend for each lengthy named item and uncheck the show legend title (In order to keep legend properties consistent, make the specifications you want first, then copy/paste additional legends as needed).

2. Add dummy layers as needed to achieve the appropriate width by following the steps above.

3. In legend properties change the spacing between items to a negative number (-4 or -5 seem to be good for me).

4. Line up legends so they are appropriately proportioned and distanced from one another.

These four extra steps may not be worth it due to time involved. I still prefer using this method, but it all depends on the project and whether it is worth taking the extra steps and time involved.
Another option - easier posted by Shauna Lee on Oct 14 2010 8:43PM
This was posteded on another site, but very applicable......

From zorbac Jul 22, 2010....
This functionality already exists. You use the Description. Here is how it works: In the layer properties, symbology tab, click the "Description" button. Type in the desired legend text. for new line hold down the ctrl key and hit enter. Then in legend, edit the style for that layer - instead of checking "Show Labels", check "Show Descriptions". Done.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |