I have labelled a points layer by defining a line between points and labels, because points were overlapping too much. Using additional columns in the points layer attributes table (
LABEL_Y), I can move the labels manually.
To achieve that, I have added a 'Geometry Generator' in the Style section of the layer's Properties dialog. To define the geometry generator, I have used the following expression where
$y are the features' coordinates and
LABEL_Y are the labels' coordinates:
My issue is that labels do not align properly with the line connecting them to features. There seems to be a default offset. How could I correct it? The images below show (1) the way labels display inside the map canvas and (2) the Geometry Generator definition.
Image 1 : Labels with connecting-to-features lines
Image 2 : Geometry Generator definition