Label stacking separators - can we use a word?

967
5
08-31-2022 07:42 AM
Status: Closed
Labels (1)
by Anonymous User
Not applicable

Hello all,

I'm using ArcGIS Pro 2.9.3. I have a need to create a label that stacks after the word "to". But the stacking separator only allows one character. If I use the "o" character it splits it everywhere I have an "o" (naturally) and this is not desirable. Screenshot: 

Would like to split after the word "to":

AndreaB_1-1661956771231.png

 

Splitting after every "o" - Not desirable: 

AndreaB_0-1661956634587.png

Also, side note: I've never gotten the "Maximum number of lines" to actually constrain the label to the maximum number of lines. Bug? 

In the above example screenshot of a label with 4 lines the settings are actually:

AndreaB_2-1661956865254.png

Thank you!

Tags (1)
5 Comments
jcarlson

I believe that "max lines" setting is how many times the stack settings will insert line breaks. Do you happen to have a manual line break in your string anywhere?

If you need to split the label at a multi-character string, I'd insert the break into the label string itself on the Label Expression, not in the stacking sections.

var l = $feature.label_field

return replace(l, 'to', 'to\n') // or just '\n' to make "to" disappear
by Anonymous User

@jcarlson Yes, I do have a manual line break in my string - so that finally makes sense.

Thank you! That was perfect and exactly what I needed!

JesseWickizer

Another method besides the label expression that @jcarlson suggested is to use an abbreviation dictionary (translation) to add a stacking character such as a slash, then force stack on that character in the stacking settings.

JesseWickizer_0-1661961380128.png

 

by Anonymous User

Thanks @JesseWickizer! I didn't know that either.

WendyHarrison
Status changed to: Closed

Solutions have been offered in the comments.