[Qgis-user] label layer with attributes in different styles

Richard McDonnell richard.mcdonnell at opw.ie
Thu Aug 27 07:12:10 PDT 2020


Hi I have one possible solution, or work around...

1.       Use your Layer to display the first part Name

2.       Duplicate the layer and set it to not display symbols (Properties - Symbology - No Symbols)

3.       Label the duplicate with the "Second Half" of your Label, the Brackets and Number.

4.       Now under placement you can position the "Second half" of your Label to line up with the first.
I have not tried it, but it's the only solution I can come up with at the moment.
Regards,

Richard.




--
Richard McDonnell MSc GIS, FME Certified Professional
FRM Data Management

--
Oifig na nOibreacha Poiblí
Office of Public Works

Sráid Jonathan Swift, Baile Átha Troim, Co na Mí, C15 NX36
Jonathan Swift Street, Trim, Co Meath, C15 NX36
--
M +353 87 688 5964 T +353 1 647 6543
https://www.opw.ie

--
To send me files larger than 30MB, please use the link below https://filetransfer.opw.ie/filedrop/richard.mcdonnell@opw.ie

Email Disclaimer: https://www.opw.ie/en/disclaimer/
From: Qgis-user <qgis-user-bounces at lists.osgeo.org> On Behalf Of Grün, Michael
Sent: 27 August 2020 14:28
To: qgis-user at lists.osgeo.org
Subject: [Qgis-user] label layer with attributes in different styles

Hi all,
Very simple example:
I have a point layer and I want to label it with 2 attributes (name, number) and differ them within their styles.
Cologne (10)
Hamburg (14)
name || ' ' || '(' ||  "number"  || ')'

Now I just want for more difference the number (and brackets) in another colour (or style, bold e.g.).
Cologne (10)
Hamburg (14)

I tried it with the button "data devided override" - but changes always for both attributes, no difference within.
I tried rule-based labeling - without result.
Allow HTML formatting <b>number</b>, but how?
Actually I thought this would be very simple...any hints?
Thanx a lot...kindly regards, Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20200827/11307bad/attachment.html>


More information about the Qgis-user mailing list