Thursday 16 January 2020

labeling - Creating multiple lines label in QGIS?



I try to create a multiple lines label for this this polygon:


enter image description here


I red


How to create multiline labels in QGIS?


QGIS, Multiple lines and wrap on character?


and tried to use the "wordwrap" function with this expression:


wordwrap('high sensivtity area - red',10  )

and in the output preview (down the Expression string builder) it look fine and this is the result i'm seeking - but when i choose OK - nothing change in the map.


I don't want to use the option to put a space in the 'Wrap on character' section, because i don't want each word i separate line



enter image description here



Answer



If 'high sensitivity area - red' is located in the attribute table you can use the field name instead of the direct string, as follows:


wordwrap( "Field_name" ,10)


It should be defined in the expression under Label with:


enter image description here


Here is the output result:


enter image description here


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...