LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zoom graph with keyboard

Solved!
Go to solution

Hi All,

 

How can I zoom or pan a graph using the keyboard instead of the mouse?

 

Cheers

 

Patrick

0 Kudos
Message 1 of 3
(2,316 Views)
Solution
Accepted by topic author pat777

Patrick,

 

I don't believe there is a property/method you can access to do this but it is possible.  I would suggest capturing the key down event using an event structure and then modfiying the graph x and y scale ranges by some increment to either zoom in or zoom out.  This can be done by writing to a property node (X Scale - Range - Maximum/Minimum). You will want to control the loop rate appropriately to achieve a reasonable speed of zooming.  

 

Dan

Message 2 of 3
(2,312 Views)

Hi Dan,

 

Thanks for you answer, working with the property nodes, X / Y Scale Range Maximum / Minimum, did the job.

To capture the pressed key I am using the Initialize Keyboard.vi, Acquire Input Data.vi (shipped with LabView) and a

Index Array wired into a case structure. Depending on what I want to do, Zoom In / Out or Pan left / right, I am increasing

or decreasing the Scale Maximum / Minimum.

 

Cheers

 

Patrick

 

0 Kudos
Message 3 of 3
(2,275 Views)