LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I add vertical text to my graph?

Hi. I need to label my cursors but I need the text to be vertical, I mean clockwise or counterclockwise. I didn't find any graph property to do it, so I thought about adding text labels programatically, but I can't figure how to do this.
I also thougth about overlapping a picture control with the text, but it would be too tricky to align the text with the exact point in my graph.
I know that one can convert the graph to a picture and then add the text, but I won't do that because I would like to keep all graph pallette funcinality.

Any comments and suggestions appeciated.

Daniel

PD: It's a little strange that LV7.1 still doesn't have the vertical cursor label option.
0 Kudos
Message 1 of 5
(3,060 Views)
Hola Daniel

Estoy de acuerdo en que deberia existir un "property node" para especificar texto horizontal o vertical en los cursores.
Mientras tanto, espero que te sirva mi solucion, que adjunto en un .doc

Saludos
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 2 of 5
(3,060 Views)
Ok, Alipio, muy ingenioso. Eso haré.

Anyway, if someone knows how to rotate cursors text clockwise or counterclockwise, please let me know.

See you.

Daniel
0 Kudos
Message 3 of 5
(3,060 Views)

12 years later, does anyone know how to do this?

Jim

LV 2020
0 Kudos
Message 4 of 5
(2,443 Views)

Hi,

 

It looks like LabVIEW doesn't give the ability to rotate a graph's cursor label. There's an idea submitted for it, though: https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Rotate-and-format-cursor-labels-on-graphs/idi-p/10110....

 

You can use a 2-D picture control, write rotated text to it, and move the pic to the location of the cursor. Here's a starting point for you:

 

Vertical Cursor Label.png

 

Vertical Cursor Label FP.png

 

You'll have to run with the ball with this code. It'll work as long as the X and Y scales are positive and you use the mouse to drag the cursor around. You'll have to take into account negative coordinates and scaling as the code tries to convert the graph's coordinates into front panel positions programmatically. It gets tricky as graph y coordinates are positive going up while front panel positions are positive going down.

 

 

Feel free. Contact me for anything more,
    Pang

You too can be LabVIEW Awesome!
Message 5 of 5
(2,429 Views)