0

I have the graduated-styled objects in QGIS by size. Now, when I want to place the label always next to the symbol on the bottom right, some labels appear partially inside of the symbol, and the other ones are too far from the symbol.

https://i.imgur.com/xIcQ58C.png

I found the solution here:

Label placement priority in QGIS

but when I prepare the formula like this:

duration = 'BR'

the symbol disappears.

Basically, the offset from the point option doesn't work as it defines offset just from the point, not from the symbol bounds. The only option is Cartographic and from the symbol bounds, but I can't specify the exact place where the label could appear.

5
  • Just to be clear: You have a point layer. You set the labels to "cartographic". And you want to override the placement to be at the bottom right of the symbols?
    – Erik
    Jan 30 at 16:18
  • I have no faintest idea why I cannot add an image to this question. See the link here: i.imgur.com/xIcQ58C.png I want them on the bottom right but sticking to the symbol only not being too far or partially inside. Is that possible?
    – Geographos
    Jan 30 at 16:24
  • Is that a point layer with data-driven/categorized size? Or is it a polygon layer? Could you add a screenshot with your label placement settings? And yes, screenshot-uploading seems to be faulty currently.
    – Erik
    Jan 30 at 16:30
  • It's a point layer with graduated styling by size. Eventually, I have the circles around the point.
    – Geographos
    Jan 30 at 16:37
  • 2
    you need to set the label offset as data defined override by using a formula based on your graduated styling by size
    – J.R
    Jan 30 at 17:17

1 Answer 1

3

I'm not sure why you used duration = 'BR' for your label placement priority data-defined override as this is a logical test that returns a result of either 1 (true) or 0 (false), neither of which are expected inputs for the label placement priority setting.

If you open the Position Priority data-defined override Expression Dialog box it shows you what the expected values are: one or more of the placements as listed (e.g. 'TL' or 'BR'), separated by commas.

enter image description here

Using just 'BR' in the Position Priority data-defined override works: all labels are outside the symbol bounds on the bottom-right hand side, even with size-based symbology.

enter image description here

1
  • This is EXACTLY what I was after! Thank you so much!
    – Geographos
    Jan 31 at 10:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.