07-13-2010 11:25 AM
I'm looking to add a few buttons and/or hotkeys to a graph control that would allow you to zoom in or out a specific amount, or would zoom to fit horizontally or vertically, but I can't find any way to change the zoom on a graph programatically (in LabWindows/CVI 9.0) - the only zooming functions/attributes I find are about auto-scaling and such. Does anyone know what kind of functions I would use if I wanted to programatically change the current display on a graph control?
Solved! Go to Solution.
07-13-2010 01:08 PM
Hi,
you can achieve zooming by setting the scaling mode to manual. For example,
SetAxisScalingMode ( panel, PANEL_GRAPH, VAL_BOTTOM_XAXIS, VAL_MANUAL, zoom_x_min, zoom_x_max );
will adjust the x-axis to the range given by zoom_x_min and zoom_x_max. The same is true for the vertical axis.
07-13-2010 08:25 PM
That worked perfectly. Thanks!
07-14-2010 12:43 AM
You're welcome!