[Qgis-user] Label Issue

Charles Dixon-Paver charles at kartoza.com
Tue Feb 2 22:45:01 PST 2021


You can use the label formatting options to wrap on certain characters (so
you could specify that labels wrap at the text <newline> which you can
insert into your label value) or after a specified number of characters,
but it looks to me like you should probably change your data structure.

For example, if you had a field for name (Additional Geophysical), target
(1) and holes (52), then you could change the label value to an expression
which concatenates the values and inserts newline characters. In the
formula below, the single quotes indicate string (text) values, the '\n'
indicates a new line, and the double quotes indicate field names:

"name" || '\n' || 'Target ' || "Target" || '\n' || 'Holes ' || "holes"


On Wed, 3 Feb 2021 at 04:52, kelvin fox <geologyrocksme at hotmail.com> wrote:

> Hi Everyone,
>
> I have a field in my attribute table called "Label". I am currently
> displaying "Label" on the map as shown below. I want to display my Label on
> 2 lines in the form of
>
> Target 1
> 84 holes
>
> Target 2
> 18 holes etc
>
> How do I do this please?
>
> Kelvin
>
>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210203/d18e8958/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 28937 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210203/d18e8958/attachment.png>


More information about the Qgis-user mailing list