How to import values from 'label' in symbology window to showing them as particular labels (QGIS 3.22)? I suppose it can be done with some short, clever expression in labelling window.
-
Are you ok with setting this only once or do you want it to dynamically change based on the rule-based symbology?– kowalskiCommented Oct 3, 2022 at 8:17
-
@kowalski yes - I'd be okay with setting this once but it would be much better to see dynamic change in labelling.– AdamCommented Oct 3, 2022 at 10:37
Add a comment
|
1 Answer
You can achieve half of it.
Go to the rule based
symbology, select every rules, right click, copy.
Go to the label
options, select rule based
, right click, paste.
Doing this copies every rules, and sets the description
to the "label"
value from the symbology.
And here comes the manual, boring task that could be scripted if need be: For every label rule, click and
- check the
labels
box - copy the
description
to the label-value
-
Thank you for the solution! What's important: my aim was to get name of the column (cat in your example), not the value (1 in your example) - in this way you have to add single brackets.– AdamCommented Oct 9, 2022 at 15:34