shape become deformed problem

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
wilcohsu
Newbie
Newbie
Posts: 40
Joined: Mon Dec 18, 2006 12:00 am

shape become deformed problem

Post by wilcohsu » Thu Jan 04, 2007 9:00 am

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]

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jan 04, 2007 10:37 am

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()));
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply