I can get polyline labels to appear parallel to the line but I'd really like to have them off the end of the line, not on the line. Is there a way of doing this with QGIS?
Firstly, go on the
Layer Properties >
Then, edit the expression for both X and Y coordinates, as in the image below:
In the expression field, use
x_at(-1) for setting the label at the start or at end of the features, respectively (do the same for the Y coordinate):
Finally, click on the
Apply button and enjoy!
If you see that some option has been overridden, you will still be able to set the desired output if you follow these two last steps (see the image below):
3) Edit the "Rotation" parameter in the same way as before, but use this expression:
90 + line_interpolate_angle( $geometry, 0)
4) Go again to the step 2 (only step 2, only for the X coordinate!) and edit the expression by adding an "offset" to your end point (it will depend on the measurement units). For example, if I set this expression:
$x_at( -1) + 5
I will obtain the result you see in the image (I think as expected).