LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I detect which point a user selects on an xy graph

Hopefully this is trvial but I have a VI with an xy graph and an event structure in a loop. When an operator clicks on a sample I want to be able to determine which sample was clicked on? Does anyone know how to do this or have a good example? Thanks.

0 Kudos
Message 1 of 4
(2,724 Views)

You can use a mix of the Mouse Down event and a Map Coords to XY method to allow the user to select a data point with a click. 

 

Theck out the last comment on this thread.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 4
(2,720 Views)

I found a map coordinates to XY but want a snapped answer.

0 Kudos
Message 3 of 4
(2,712 Views)

If you create a Cursor, you can write the XY that is output directly tot he Cursor Position with a property node and the cursor will snap to the graph.

 

You can then use the cursor's info to pull the specific data point.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 4
(2,706 Views)