Charts are drawn with offset in TeeChart Pro 8.07

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Collinor
Newbie
Newbie
Posts: 15
Joined: Wed Oct 31, 2007 12:00 am

Charts are drawn with offset in TeeChart Pro 8.07

Post by Collinor » Wed Aug 11, 2010 7:41 am

These days we recognized that with TeeChart Pro 8.07 a chart is drawn with an offset and thus with the unpleasant side-effect that, in case of a bar series (either horizontal or vertical), part of the last bar is partially overlapped by the chart's border.
The reason for this are the source code changes in lines 12232 and 12245 of TeEngine.pas marked with TV52014436 (method TCustomAxisPanel.InternalDraw, CalcSeriesAXisRect):

Code: Select all

                // TV52014436
                if (Axis.MinimumOffset=0) and Axis.AutomaticMinimum then Axis.MinimumOffset:=a;
                if (Axis.MaximumOffset=0) and Axis.AutomaticMaximum then Axis.MaximumOffset:=b;

Code: Select all

                // TV52014436
                if (Axis.MinimumOffset=0) and Axis.AutomaticMinimum then Axis.MinimumOffset:=b;
                if (Axis.MaximumOffset=0) and Axis.AutomaticMaximum then Axis.MaximumOffset:=a;
If I revert to the code in lines 12234 and 12247 of TeEngine.pas, everything's fine:

Code: Select all

//                if Axis.AutomaticMinimum then Left :=Math.Max(Left,a);
//                if Axis.AutomaticMaximum then Right:=Math.Max(Right,b);

Code: Select all

//                if Axis.AutomaticMaximum then Top   :=Math.Max(Top,a);
//                if Axis.AutomaticMinimum then Bottom:=Math.Max(Bottom,b);
For the time being we will work with a patched TeEngine.pas, but it would be nice to have this fixed in one of the next maintenance releases.

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Charts are drawn with offset in TeeChart Pro 8.07

Post by Yeray » Thu Aug 12, 2010 2:01 pm

Hi Collinor,

The change you mentioned was implemented on 29/12/2009, but it changed again on 28/05/2010.
The actual version of the TeEngine.pas in the TeeChart v2010 sources has:

Code: Select all

                if (Axis.MinimumOffset=0) and Axis.AutomaticMinimum then Left :=Math.Max(Left,a);
                if (Axis.MaximumOffset=0) and Axis.AutomaticMaximum then Right:=Math.Max(Right,b);

Code: Select all

                if (Axis.MinimumOffset=0) and Axis.AutomaticMaximum then Top   :=Math.Max(Top,a);
                if (Axis.MaximumOffset=0) and Axis.AutomaticMinimum then Bottom:=Math.Max(Bottom,b);
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Steve Maughan
Newbie
Newbie
Posts: 48
Joined: Tue Aug 03, 2010 12:00 am

Re: Charts are drawn with offset in TeeChart Pro 8.07

Post by Steve Maughan » Wed Aug 18, 2010 4:29 pm

I'm also having problems with bar charts which were draw correctly using 8.06 and are now drawn with an overlap in VCL 2010. I'm also having a few problems replicating the issue in a simple project.

Cheers,

Steve

Yeray
Site Admin
Site Admin
Posts: 9534
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Charts are drawn with offset in TeeChart Pro 8.07

Post by Yeray » Thu Aug 19, 2010 3:42 pm

Hi Steve,

Since you are a source customer, could you please try if changing the lines mentioned above the problem is solved for you?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply