LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get X Value by using a "drag-able" line on XY Graph

I have a XY graph inside a while loop. I need a vertical line to appear on the X-value where I click on the graph and give me the x-value there. And upon clicking on another place on the graph the line should move there to give and new x-value given out.

 

(The vertical line is not actually. I just need the x-value depending on where I click on the graph)

 

I am fairly new to labVIEW and not an expert in using property nodes.

 

Thanks.

0 Kudos
Message 1 of 5
(3,211 Views)

Display the Cursor Legend and Add a cursor.

Create an event for XY Graph Mouse Up.

Create a property node. Set Active Cursor to 0.

Oops, no code capture on this PC. Here's a png.

Message 2 of 5
(3,207 Views)

Thank you. The png helped.

Although, it works only if you drag the cursor now......is there a way to make it work if i just click anywhere on the graph?

0 Kudos
Message 3 of 5
(3,198 Views)

Oops, I didn't read your question properly.

You could turn pixels into a scaled x value, move the cursor there (snap-to mode), then read the cursor position again.

Quick and dirty png:

 

Arg, why won't the image post?

0 Kudos
Message 4 of 5
(3,178 Views)

Trying image again.

0 Kudos
Message 5 of 5
(3,176 Views)