Page 1 of 1

shape become deformed problem

Posted: Thu Jan 04, 2007 9:00 am
by 9643419
Step1.Define two circular shape in below position:

shape1.X0 = 0.2;
shape1.X1 = 11.2;
shape1.Y0 = 0.2;
shape1.Y1 = 11.2;

shape2.X0 = 5.3;
shape2.X1 = 5.7;
shape2.Y0 = 0;
shape2.Y1 = 0.4;

Step2:Move shape2 to left in shape1

shape2.X0 = 0;
shape2.X1 = 0.4;
shape2.Y0 = 5.3;
shape2.Y1 = 5.7;

Result:The shape1 seem extrude towards the right,
but zoom in is OK.

[Version:2.0.2546.16099]

Posted: Thu Jan 04, 2007 10:37 am
by narcis
Hi wilcohsu,

This is not a bug. Originally the left axis ranges from 0 to 11.2 and bottom axis from 0.2 to 11.2. After moving shape2, axes automatically re-scale and thus left axis ranges from 0.2 to 11.2 and bottom axis from 0 to 11.2 to fit the new series representation.

If you don't want axes to automatically scale themselves you can add the code below to your application's initialization routine:

Code: Select all

            tChart1.Axes.Left.SetMinMax(0, Math.Max(shape1.MaxYValue(), shape2.MaxYValue()));
            tChart1.Axes.Bottom.SetMinMax(0, Math.Max(shape1.MaxXValue(), shape2.MaxXValue()));