How do I rotate UI text

Hi all, I’m trying to simulate a radar screen with data tags ( see image below). I’m using a UI canvas with a text component and a script attached but I need the text to remain horizontal so to be easily readable, even though the objects will be rotating at times. I’ve done this before but lost my work & unfortunately that part wasn’t saved and I cant remember exactly how I done it, it was something like :

Rect.transform = new Vector 3 ( 90, 0 , 0 );

Thanks

How about

myText.rectTransform.rotation.eulerAngles = new Vector3( 90, 0 , 0 );

It was

txt.transform.eulerAngles = new Vector3  ( 90, 0 , 0 );

But thanks anyway.