1

I have tried the solution found in Dynamic breaks of legend text in QGIS Atlas

I am using QGIS 3.10.6-A Coruña.

I have attached a screengrab below. I use the "wordwrap" expression and it seems to work well - see "1" in red text (in the legend item properties). However, the actual legend for the layout does not wrap - see "2" in red text. Spaces in the legend text are removed - indicated by the red arrows. The red text "3" shows the wordwrap expression.

How do I fix the legend in the layout, not just in the legend item properties?

Screengrab displaying legend/s and expression string builder

Ian Turton
  • 81,417
  • 6
  • 84
  • 185
user163808
  • 51
  • 3
  • Did you try open the expression button (againg), without changes and close immediately? Then the legend updates. – Babel Sep 23 '21 at 08:03
  • Hi Babel, Thanks for the feedback. I tried following your suggestion and some variations. I opened and then closed using the red button in the top corner of the Expression Dialogue Builder box. I tried opening and closing using the cancel button and the ok button. None of the suggestions helped. Have I understood your suggestion correctly? Thanks – user163808 Sep 23 '21 at 23:17
  • Sometimes pressing the refresh button after using the expression helps.

    But that aside, I strongly recommend updating to a newer version of QGIS - at least QGIS 3.14 - the legend functionality has vastly improved and ironed out a lot of bugs, which your issue looks like it might be.

    The most powerful improvements include being able to manually edit legend item symbols (custom shapes or symbols), and create manual column breaks.

    – she_weeds Oct 04 '21 at 08:04
  • Thanks she_weeds, I am now using QGIS 3.20.3-Odense. I can now use the wordwrap function in the Expression editor for that part of the Legend. However, I cannot turn Auto update off. and delete unwanted Legend items. A work-around achieves my desired outcome. I paste a white box over the unwanted Legend items. – user163808 Dec 14 '21 at 02:01

1 Answers1

0

Taking the comment advice of @she_weeds, I am now using QGIS 3.20.3-Odense. I can now use the wordwrap function in the Expression editor for that part of the Legend. However, I cannot turn Auto update off. and delete unwanted Legend items. A work-around achieves my desired outcome. I paste a white box over the unwanted Legend items.

Vince
  • 20,017
  • 15
  • 45
  • 64
user163808
  • 51
  • 3