Bin für Vorschläge immer offen. Wenn du weißt wie man das hier einbaut, immer her damit
Delphi-Quellcode:
procedure CreateSeries(const SeriesType: TCustomSeries; const SeriesGroup: TSeriesGroup; const Name: string; const Color: Integer);
var
CustomSeries: TCustomSeries;
begin
if Assigned(FormMain.Chart1.FindComponent(Name)) then
Exit;
if SeriesType = TCustomSeries(TAreaSeries) then
CustomSeries := TCustomSeries(TAreaSeries.Create(FormMain.Chart1))
else if SeriesType = TCustomSeries(TLineSeries) then
CustomSeries := TCustomSeries(TLineSeries.Create(FormMain.Chart1))
else if SeriesType = TCustomSeries(TBarSeries) then
CustomSeries := TCustomSeries(TBarSeries.Create(FormMain.Chart1))
else
CustomSeries := nil;
if CustomSeries = nil then
Exit;
CustomSeries.Name := Name;
CustomSeries.SetSeriesGroup(SeriesGroup);
CustomSeries.ParentChart := FormMain.Chart1;
CustomSeries......
end;