开发者

ZedGraph AxisChange() reset?

I'm using C#. When I use AxisChange() to adjust the axis on my graph, it works fine, until I go into the graph pane and manually zoom in and out.

After manually zooming in and out, the AxisChange() command no longer works. How can you get it so after the axis gets fixed, you can again use AxisChange()开发者_运维知识库?


I've checked the code of AxisChange() method and I think this is because of following code:

            // if the ChartRect is not yet determined, then pick a scale based on a default ChartRect
        // size (using 75% of Rect -- code is in Axis.CalcMaxLabels() )
        // With the scale picked, call CalcChartRect() so calculate a real ChartRect
        // then let the scales re-calculate to make sure that the assumption was ok
        if ( _chart._isRectAuto )
        {
            PickScale( g, scaleFactor );

            _chart._rect = CalcChartRect( g );
            //this.pieRect = PieItem.CalcPieRect( g, this, scaleFactor, this.chartRect );
        }

I’m not sure though, you should give a try copy line … outside the “if” clause and see what happens. Any way, try to debug the source code, it is good enough for understanding.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜