33

This question was posted in 2011, and someone has said that QGIS now allows multiple lines for legend entries, but no one mentioned how to do this. I am running wein 2.8.1 and I cannot figure out how to get my legend entry on multiple lines other than manually using text.

enter image description here

0

1 Answer 1

61

In QGIS 2.8 Composer, there's a Wrap text on option in the Item properties tab when you add a legend which lets you enter a character where you want the new line to start. What I normally do is use the * character in the layer's name for where I want the new line. Then input the * into the Wrap text option.

(I'm using QGIS 2.8.2-Wien):

Layer names

Wrap text options

4
  • 7
    Is there an automatic way to do this? I am thinking about taking character count as consideration to wrap labels. sometimes you have hundreds of classes to list in a legend, which makes this approach rather unhandy
    – hilpers
    Feb 27, 2017 at 9:17
  • 1
    @hilpers - I'm sure you can but it's best to ask this as a new question as there are probably others who have found a method you're looking for :)
    – Joseph
    Feb 28, 2017 at 12:56
  • 2
    You can also change the layer display name in the legend settings of the layout to avoid renaming them in the layer panel. Jun 13, 2018 at 21:31
  • For automation, look at this answer and my comment: gis.stackexchange.com/a/449443/203521
    – Beni
    Jan 13 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.