line feed/cartiage return in the legend label?

5104
7
02-05-2013 01:48 PM
PaulHuffman
Occasional Contributor III
The director wants me to revise a map I made three years ago.  I finished all the changes except this last one. So close to being done! He wanted an addition to the legend for one item that results in a 150 character string. This will push the legend box way out of shape to stick the whole string in the label field of the category symbology set up.  Is there a way to get the label field in symbology to take a line feed/carriage return or maybe two so I can format this legend better?

The only other way I can think of is to make a legend with this one category with no label, another legend of all the other  categories, both without frames, position them on a colored rectangle with enough space between them that I can add the 150 character string carefully positioned and aligned  so it looks like a legend label.

Using ArcGIS Desktop 10.1, windows.
Tags (2)
0 Kudos
7 Replies
NaseefChowdhury
New Contributor II
Changing the labeling engine to use Maplex will make the legend automatically wordwrap which should solve your problem.

Right click Data Frame > Properties > General > Label Engine > Maplex Label Engine
0 Kudos
curtvprice
MVP Esteemed Contributor
The director wants me to revise a map I made three years ago.  I finished all the changes except this last one. So close to being done! He wanted an addition to the legend for one item that results in a 150 character string. This will push the legend box way out of shape to stick the whole string in the label field of the category symbology set up.  Is there a way to get the label field in symbology to take a line feed/carriage return or maybe two so I can format this legend better?


The layer description and the legend text can have embedded linefeeds with ctrl-Enter, but I don't know of a way to do this for an individual key item.

If all else fails you can right-click the legend and convert to graphics. The downside is that "freezes" the legend so you want to do it as a last resort, and after you are sure map contents are not going to change. (If they do, no big deal, but you have to re-do it.)
0 Kudos
TrishRice
Occasional Contributor III
Symbol descriptions can hold carriage returns and be used in legends.  http://mappingcenter.esri.com
/index.cfm?fa=ask.answers&q=1089
0 Kudos
PaulHuffman
Occasional Contributor III
Inserting a control - enter into the legend label sounds so great. But why can't I do it? I'm positioning my curser in the label Klickitat Salmon Hatchery (spring & fall chinook, coho)  right in front of the left parenthesis, holding down control, pushing the enter key, then going to Ok, apply, but nothing in the legend changes.    [ATTACH=CONFIG]21482[/ATTACH]

All that Maplex idea did was fold up my scattered fc labels, stuff that fit well enough I didn't have to use annotation.
0 Kudos
TrishRice
Occasional Contributor III
Inserting a control - enter into the legend label sounds so great. But why can't I do it?

I tried that at first too with the same problem. 😉  You right click on the symbology value and click "Edit Description," this is where you can enter text with the carriage returns.  Then in the legend properties, Items tab, you can set the style for a given feature class to use the label and/or description.
0 Kudos
PaulHuffman
Occasional Contributor III
David B's idea is working great. I hadn't noticed that option before.  I just have one little detail left to solve. When I first checked the wrap labels box, the default was 72 pts, which severely wrapped the labels and made my legend box way too narrow.  I increased the pts until I got it looking just about right except the layer name "Habitat Projects" stayed wrapped no matter how wide I set the label and descriptions wrap.  If I could just fix this, I can leave the legend text this size and won't have to edit the callout annotation that it's covering, won't have to move it much. One of the changes the director wanted was to make this annotation text a lot longer. 

[ATTACH=CONFIG]21499[/ATTACH]
0 Kudos
PaulHuffman
Occasional Contributor III
Thanks, David. Now I'm finally done with this project.
0 Kudos