Zedgraph - Set min / max values ​​on axis

I am working on a zedgraph where the y axis is a percentage value. I want the min and max values ​​to be 0/100 respectively. I can set this using the GraphPane.YAxis.Scale.Min and Max properties, and it works fine.

However, if the user drags a rectangle to change the "viewport" of the graph or zoom in / out, the min / max of the Y-axis changes. Is there a way that I can force the Min / Max values ​​to be saved, but still allow the user to scale / draw the selection window (essentially, allowing them to simply pan / scale the x axis).

I tried installing MinAuto / MaxAuto, but this does not seem to have an effect.

+5
source share
1 answer

I had the same problem and solved this:

zedGraphControl1.IsEnableVZoom = false;
zedGraphControl1.IsEnableVPan = false;

This should only allow horizontal scaling.

+4
source

All Articles