开发者

ZedGraph SetScaleToDefault Function?

开发者 https://www.devze.com 2023-03-15 10:49 出处:网络
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 t

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

精彩评论

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