Two ways,
Medthod 1. Rt-click the graph, select Visible Items...Graph Palette. The center button on the graph palette shows a popup for zooming. The bottom left function on the popup will rezoom the data in your graph to best fit.
Method 2. If you would like to programmatically autoscale the X and Y axis, you can set the YScale.ScaleFit property of the graph or chart. It can be set to Do not Autoscale, Autoscale Once, and Autoscale. If you set it to Autoscale Once, it will best fit your data.
- Put a property node on your block diagram (rt-click chart...create...Property Node...Active Y Scale).
- Rt-click the property node, select Change all to Write.
- Wire "0" to ActYScl to set properties for the y-scale
- Expand the property node to show another property
- Select Scale Fit property (Y Scale...Scale Fit)
- Wire "1" to the property to Autoscale once