ZedGraph Scaling and Resizing

When I draw a graph and increase and decrease it and redraw, the location of the graph does not change.

What I want to be able to do is change the view to see all the graphic data whenever the data is redrawn. This seems to be disabled if you zoom in or out before redrawing.

Thank!

+3
source share
2 answers

Set the property .IsZoomOnMouseCenterto true for the control:

zedGraphControl1.IsZoomOnMouseCenter = true;

You can also change the settings for horizontal and / or vertical scaling if you want to allow the graphic to only scale (stretch) along one axis:

// Enable only horizontal zoom/stretch
zedGraphControl1.IsEnableHZoom = true;
zedGraphControl1.IsEnableVZoom = false;
+3
source

Zedgraph:   //   zg1.ZoomOutAll(GraphPane);

0

All Articles