5

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 via the GraphPane.YAxis.Scale.Min and Max properties, and this works fine.

However, if the user does the rectangle drag to change the "viewport" of the graph, or zooms in/out, the Y-axis min/max changes. Is there a way I can force the Min/Max values to persist, but still allow the user to zoom / draw the selection box (essentially, allowing them to JUST pan/zoom the x-axis).

I've tried setting MinAuto / MaxAuto, but this seems to have no effect.

Stealth Rabbi
  • 10,156
  • 22
  • 100
  • 176

1 Answers1

4

I had the same problem and solved it like this:

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

This should only allow Horizontal Zoom.

asdasdad
  • 832
  • 3
  • 15
  • 27
  • 1
    I was looking for a property for this on the GraphePane class. Didn't even think to look on the ZGC itself. This works great. thanks. – Stealth Rabbi Jun 01 '12 at 12:08