RAP object is not retrieved
Running the following loop only sets the title of the first series.
procedure TitleAfterPrint;
var Series: TChartSeries;
Title: string;
X: integer;
begin
for X := 0 to 3
do begin
Series := DPTeeChart1.Chart.Series[X];
ChartSeriesSetTitle(Series, 'blabla');
end;
end;
class function TRapChartSeriesSetTitle.IsFunction: Boolean;
begin
Result := False;
end;
class function TRapChartSeriesSetTitle.GetSignature: String;
begin
Result := 'procedure ChartSeriesSetTitle(ASeries: TChartSeries;
ATitle: string);';
end;
procedure TRapChartSeriesSetTitle.ExecuteFunction(aParams: TraParamList);
var lSeries: TChartSeries;
lTitle: string;
begin
GetParamValue(0, lSeries);
GetParamValue(1, lTitle);
lSeries.Title := lTitle;
end;
procedure TitleAfterPrint;
var Series: TChartSeries;
Title: string;
X: integer;
begin
for X := 0 to 3
do begin
Series := DPTeeChart1.Chart.Series[X];
ChartSeriesSetTitle(Series, 'blabla');
end;
end;
class function TRapChartSeriesSetTitle.IsFunction: Boolean;
begin
Result := False;
end;
class function TRapChartSeriesSetTitle.GetSignature: String;
begin
Result := 'procedure ChartSeriesSetTitle(ASeries: TChartSeries;
ATitle: string);';
end;
procedure TRapChartSeriesSetTitle.ExecuteFunction(aParams: TraParamList);
var lSeries: TChartSeries;
lTitle: string;
begin
GetParamValue(0, lSeries);
GetParamValue(1, lTitle);
lSeries.Title := lTitle;
end;
This discussion has been closed.
Comments
We were able to recreate this and are currently researching a solution.
I will post here when one is found.
Currently you will need to call the ChartSeriesSetTitle routine for each
series manually (outside a loop).
lSeries := DPTeeChart1.Chart.Series[0];
ChartSeriesSetTitle(lSeries, 'MySeries1');
lSeries := DPTeeChart1.Chart.Series[1];
ChartSeriesSetTitle(lSeries, 'MySeries2');
...
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com