[GIS] How to create vertical labels in QGIS

labelingqgis

How to create vertical labels (each label in new line) like:

1998
150
pipe name

and not horizontal:

1998 150 pipe name

Best Answer

You can use a QGIS expression in the label expression.

"Date" || '\n' || "Size" || '\n' || "name"

You can even wrap the expression over multi lines to do the same thing

"Date" || '
' || "Size" || '
' || "name"

Note the ' at the end and start of each line. The first is clearer with its intentions so I would use that.

If one of the fields can contain NULL values, you can use concat() instead of || concatenator:

concat("Date",'\n',"Size",'\n',"name")
Related Question