2

I need to rotate only one label from three seen below

enter image description here

I found some solutions here:

How to rotate labels by the same angle as the map in the composer?

QGIS Labels Rotation

and also here:

Using Trigonometry To Place And Orientate Labels

But it looks like they are referred for all labels belonging to the given layer. I just want to set the condition for for rotating one of them.

My expression could look like this:

 CASE
  WHEN "fid" = 18 then rotation 'degrees 45'
 End

but QGIS says, that my expression is invalid.

Is anyone able to help?

4

Rotation accepts int, double or string(including number) value.

CASE
  WHEN "fid" = 18 THEN 45 
  WHEN "fid" = 28 THEN '45'
  WHEN "fid" = 38 THEN 45.0
END
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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