Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ZedGraph Zooming And Resizing

Tags:

c#

zedgraph

When I draw a graph, and zoom in and out of it, and redraw it, the location of the graph doesn't change.

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

Thanks!

like image 362
sooprise Avatar asked Oct 31 '25 09:10

sooprise


1 Answers

Set the property .IsZoomOnMouseCenter to true for the control:

zedGraphControl1.IsZoomOnMouseCenter = true;

Also you may want to change the settings for horizontal and/or vertical zoom, in case you want to allow the graph to only zoom (stretch) along one axis:

// Enable only horizontal zoom/stretch
zedGraphControl1.IsEnableHZoom = true;
zedGraphControl1.IsEnableVZoom = false;
like image 190
JYelton Avatar answered Nov 02 '25 00:11

JYelton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!