Select to view content in your preferred language

Allow Text Formatting Tags in legend

1375
3
03-06-2024 07:58 AM
Status: Open
Labels (1)
IlkaIllers1
Frequent Contributor

I have wished several times to manipulate the legend further by:

1. Adding multiple line breaks for long group layer names/layer names/headings

2. changing the font (italics, bold, colour, size, underlined)

3. other changes that could be achieved via Text Formatting Tags

Would it be possible to include this functionality?

 

 

3 Comments
HollyTorpey_LSA

You can add tags to add some text formatting in legend items (and graphic text). Here's an example:

This layer name in my table of contents...

HollyTorpey_LSA_0-1711058520717.png

results in this layer name in my legend:

HollyTorpey_LSA_2-1711058592702.png

More on that here. I don't know how to add line breaks, though (other than by using the description rather than the layer name or label). I agree that would be useful.

 

 

Joey_Lecky

I agree. The ability to manually place line breaks in legend layer names, headings, and labels would be really nice. (We could do it in ArcMap).

A workaround can be to combine word wrapping and padding with extra spaces to force line breaks where you want them, as mentioned here: https://community.esri.com/t5/arcgis-pro-questions/carriage-return-hack-in-legend/m-p/1164807/highli...   

Its not pretty in your table of contents but better than converting the legend to graphics and manually formatting that way.

I also found that inserting this string where you need a line break in your legend can work: <fnt size="0">\n</fnt>. But the above method works better.

 

 

FabianHannich

I support this idea and would like to add the following points:
Currently, in the legend, layer names can either not be wrapped at all or only wrapped using static text formatting in the layer name – as described by HollyTorpey_LSA. A dynamic, automatic word-wrap function would be much more useful. Manually inserting "\n" in the layer name is not a practical solution for me, as the same web map is used in different contexts, and forced line breaks would then appear everywhere.
Such functionality already exists in the labeling settings of layers (see image):

FabianHannich_0-1758107308270.png

There, text is automatically wrapped after a specified number of characters. If a similar option were available for the legend, long layer names could be displayed much more easily and consistently – without any workarounds or tricks.