Page 1 of 1

Charts are drawn with offset in TeeChart Pro 8.07

Posted: Wed Aug 11, 2010 7:41 am
by 10547181
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.

Re: Charts are drawn with offset in TeeChart Pro 8.07

Posted: Thu Aug 12, 2010 2:01 pm
by yeray
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);

Re: Charts are drawn with offset in TeeChart Pro 8.07

Posted: Wed Aug 18, 2010 4:29 pm
by 16556683
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

Re: Charts are drawn with offset in TeeChart Pro 8.07

Posted: Thu Aug 19, 2010 3:42 pm
by yeray
Hi Steve,

Since you are a source customer, could you please try if changing the lines mentioned above the problem is solved for you?