TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
h.hasenack
- Newbie
- Posts: 32
- Joined: Tue Jul 21, 2009 12:00 am
- Location: Nijmegen, Netherlands
Post
by h.hasenack » Fri Jul 24, 2009 11:30 am
In the Assignformat routine, some properties are linked rather than assigned
. This causes unexpected results when charts are destroyed, of series are changed because of unexpected links between series and charts.
I make extensive use of chart formats and format assignment in my app, and this is a nasty bug causing trouble when "cloning" a chart for e.g. reporting purposes with quickreports or reportbuilder
Code: Select all
procedure TChartSeries.AssignFormat(Source:TChartSeries);
var t : Integer;
begin
With TChartSeries(Source) do
begin
<snip>
Self.FPercentFormat := FPercentFormat;
{$ifdef HH_PATCH_TC_ASSIGN}
// use assignment through properties so series will be linked onto correct axis
Self.CustomHorizAxis:= CustomHorizAxis; // 6.01
Self.HorizAxis := HorizAxis;
Self.CustomVertAxis := CustomVertAxis; // 6.01
Self.VertAxis := VertAxis;
{$else}
Self.FCustomHorizAxis:= FCustomHorizAxis; // 6.01
Self.FHorizAxis := FHorizAxis;
Self.FCustomVertAxis := FCustomVertAxis; // 6.01
Self.FVertAxis := FVertAxis;
{$endif}
Self.FRecalcOptions := FRecalcOptions;
<snip>
end;
end;
Regards - Hans
-
Yeray
- Site Admin
- Posts: 9612
- Joined: Tue Dec 05, 2006 12:00 am
- Location: Girona, Catalonia
-
Contact:
Post
by Yeray » Fri Jul 24, 2009 3:03 pm
Hi Hans,
Could you also send us a simple example project we can run as-is to reproduce this problem here?
Thanks in advance.
-
h.hasenack
- Newbie
- Posts: 32
- Joined: Tue Jul 21, 2009 12:00 am
- Location: Nijmegen, Netherlands
Post
by h.hasenack » Mon Jul 27, 2009 7:36 am
Hi Yeray
The "bugfix" was a remainder of a patch I had to apply with Tee4 or Tee5, and it seems to me -after some testing- me it is no longer neccessary, probably because of the call to
Self.RecalcGetAxis; { 5.01 }
some lines further on.
But I still wonder how it can be right that the series of one chart get linked to the axis of a different chart..? (I use the Assignformat to 'clone' series between series of different charts, not series within the same chart)
-
Narcís
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Mon Jul 27, 2009 3:06 pm
Hi Hans,
Thank you very much for your collaboration!
But I still wonder how it can be right that the series of one chart get linked to the axis of a different chart..?
Yes, it seems strange but IIRC some clients used that as a way of synchronizing charts or series scales using other chart's axes as custom axes.