When a label does not fit in the available space, you can have the Maplex Label Engine split it into two or more parts and stack them to reduce its horizontal length. When you check Stack label, the Maplex Label Engine automatically stacks labels that are too long.
You can control how the Maplex Label Engine stacks labels, including the following:
- How the stacked label text is aligned
- What characters are used to indicate where the text should be split
- Whether and where these characters should appear in the label
- Whether all labels should be split at the stacking character or only when there is not enough room
- The minimum and maximum number of characters per line and the maximum number of lines
Stacked label alignment
You can choose how the text in stacked labels is aligned. There are several options:
- Automatically choose best—Depending on the location of the stacked label relative to the feature, the Maplex Label Engine will align the text to the center, left, or right. This is beneficial for placement, because the stacked labels can be moved around to potentially fit other labels on the map.
- Constrain to Left or Right—Depending on the location of the stacked label, the Maplex Label Engine will align the text to either the right or left. Text of labels placed to the left of a feature will be right-aligned, and text of labels placed to the right of a feature will be left-aligned.
- Constrain to Left—The stacked label text will be left-aligned regardless of its location.
- Constrain to Right—The stacked label text will be right-aligned regardless of its location.
- Constrain to Center—The stacked label text will be center-aligned regardless of its location.
Stacking characters
You can specify where the label is split when it is stacked by using stacking characters. Spaces and commas are frequently used to split words and are the default stacking characters, but you can use any character to split your labels. If you do not want your labels to be split at spaces and commas, you can remove them from the stacking character list. Choosing a special stacking character can be useful when you must split a label in a specific place. You can also control how and when the stacking character will split labels. When the Visible check box is checked, the stacking character will appear on the map. If it is left unchecked, the character will not appear on the map. If Stack After is checked, the split will happen after the stacking character; otherwise, it will occur before the character. If Forced Split is checked, a split will always happen at the character, and stacking will always occur.
The following is an example where all three parameters are checked:
Label expression
[Field1] & "&" & [Field2]
Field1 value = Jekyll
Field2 value = Hyde
Stacking character = &
Label string before being placed
Jekyll & Hyde
After placement
Jekyll &
Hyde
Stacking limits
You can set limits on the number of lines and the number of characters per line to control the shape of a stacked label. These limits can be used to prevent short labels from being stacked while allowing longer labels to be stacked. If the stacking character limits cannot be satisfied for a given label, the label will be split as close to the limits as possible.
- Maximum number of lines specifies the maximum number of lines, from 1 to 50, into which a label can be split.
- Minimum number of characters per line specifies the minimum number of characters, from 1 to 8, that must be in the shortest part of a stacked label. For example, if this parameter is set to 3, the label St David will not be stacked, even if the space character is used as a stacking character.
- Maximum number of characters per line specifies the maximum number of characters, from 2 to 80, that can be on a given line of a label.