tags:

views:

37

answers:

1

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. I was wondering how you can get it so after the axis get fixed, you can again use AxisChange(). Thanks!

+1  A: 

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.

Bashir Magomedov
Do you know how to disable manual zooming and resizing so i can avoid this entirely?
Soo