开发者

ZedGraph SetScaleToDefault Function?

I am having trouble when refreshing ZedGraphControl. Basically, what happens is that the scale gets messed up whe开发者_高级运维n I refresh the graph with completely new values. Sometimes it becomes too small, sometimes too big. Here is what I do when refreshing:

zgcControlAmp.AxisChange();
zgcControlAmp.Refresh();

When the scale gets messed up, I need to RightClick->SetScaleToDefault to fix the view, but sometimes it still messes up. When working with a clean graph (first run) however, all is good.

Any tips how to work around this?


Try

zgcControlAmp.AxisChange();
zgcControlAmp.Invalidate();

after refreshing the values.


Try this:

zgcControlAmp.RestoreScale(zgcControlAmp.GraphPane);

WherezgcControlAmp.GraphPane can be replaced with whatever GraphPane you are working with. (This is the same function that occurs when you RightClick->SetScaleToDefault)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜