The answer given in How can I set label-text parallel to edge-direction? is not for people writing code, but actually refers to yEd's properties view: