Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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!
Posted

1 solution

ZG.GraphPane.XAxis.Scale.Max = 6000
ZG.GraphPane.XAxis.Scale.Min = 1000
ZG.GraphPane.YAxis.Scale.Max = InputData.MaximumCount * 1.2
ZG.GraphPane.YAxis.Scale.Min = 0
ZG.ZoomOutAll(ZG.GraphPane)
ZG.AxisChange()
ZG.IsShowPointValues = True
Me.CenterToScreen()
ZG.Invalidate()

This is how I managed to control the ZedGraph Axis. I do not know if you remove some of these calls whether it will still work. After you control your graph with the Axis settings the ZoomOutAll() does not remove your adjustments.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900