LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XY graph question

I have an XY graph that I'm using to display data read from a TDMS file. I'm using a property node to set the XScale.Maximum and XScale.Minimum to allow the user to see only a portion of the graph at once. This way they see the latest data more easily and then they can scroll to the left see older data. My challenge is the Y scale. It auto scales to the the highest and lowest value recorded throughout the entire graph and not just what is being shown in the display.

How can I get the graph to auto scale the Y axis for only the data the user is currently viewing at the moment?

Thanks in advance for any help.

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

Do you need to zoom pragmatically? If not, you can expose the Graph pallet. In development environment If you Right Click on the graph under visible items properties,Show  Graph Pallet. This will Give you the zoom tools for your XY graph or Charts at run time. Also remember at run time you can right click on the axis and turn Auto Y scale and Auto X Scale off.  Hope this Helps. 

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

If you need to do this programmaticly then run your X-Y chart y data through the array min/max function and set your y axis min max with the property node just like you are doing for the x axis. You have to do this for each channel on the chart if more than one channel and get the max and min values.

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

I'm not sure if it needs to be progromatically or not.

The problem with doing it the way you describe (I think) is that I'd have to only run the data that is currently being viewed through the min/max funtion for it to work the way I want. As the user scrolls, that data would change and need ran through the Min/Max again. If I run all of the data through, I'm back where I started because the Min and Max may be places that aresn't currently being viewed by the user.

I hope that makes sense. If not, please let me know and I'll try to clarify.

Thanks for the help.

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