Proposed patch for TCHartSeries.AssignFormat bug
Posted: 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
Regards - Hans
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;