LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lab View Detecting Mouse Click on Graph

Hi,

Is there any way to detect the point at which the user click on an intensity graph? What i was trying to do was to zoom in on a mouse click. I tried using the zoom curve in labview graph but the problem with that is it zoom into half points to at the edges. Basically one can imagine that we have a square board divided into certain sections which can b ezoomed into seperately by a mouse click. I know this can be done by cursors but that doesn't look nice Smiley Happy. Besides I am already using cursors to position for scanned molecules on the plane. So is there a way to use the mouse /

Thanks,
Yatin
0 Kudos
Message 1 of 7
(4,494 Views)

Hi Yatin,

i think you can use the mouse click event. And with the position information you can calculate the position in your data.

Mike

0 Kudos
Message 2 of 7
(4,491 Views)
Hi,

I did come across the name of the event in a few places but couldnt find any tutorial. Besides isnt there a way to know the position on the graph rather than on the screen ..more calibration would be needed.. Smiley Sad anyways if i can get a tutorial on this on the web that would be of great help.. Smiley Happy

What if I puting an invisible button grid on top of the graph .. it would be really cool to make.. 

Thanks,
Yatin
0 Kudos
Message 3 of 7
(4,488 Views)
Have you taken a look at the GraphPalette? That already has a zoom control that operates on a mouse click:





Message Edited by smercurio_fc on 06-16-2008 10:17 AM
0 Kudos
Message 4 of 7
(4,484 Views)
Hi,

The Graph palette zoom is not the kind of zoom my scan does. Basically i have a 100 x 100 grid on the intensity curve. Now on clicking the appropriate regions i want to be able to zoom in the form of
X : 20i to 20 (i+1)
Y :20j to 20 (j+1)

i,j: 0-4

So, this is a kind of restricted zoom. For this i want the mouse position on the graph or on the screen ( though the second one would make things a bit difficult). I am already using cursors for something else.

Smiley Happy

Thanks,
Yatin
0 Kudos
Message 5 of 7
(4,476 Views)
You can accomplish this using the Mouse Down event and then using the Map Coords to XY Invoke Node, as shown below. That node will give you the XY values where the click occurred. Then, you can simply convert that to whatever range you want for the zoom.




Message Edited by smercurio_fc on 06-16-2008 10:45 AM
Message 6 of 7
(4,472 Views)
Hi smercurio_fc,

Thanks for the event function mouse down.. i didnt know about this..  i guess my problem's solved..Smiley Happy

Thanks again..

Yatin..
0 Kudos
Message 7 of 7
(4,434 Views)