Einzelnen Beitrag anzeigen

progopa

Registriert seit: 22. Nov 2012
28 Beiträge
 
#4

AW: Teechart kontiunierlich

  Alt 16. Mai 2013, 09:41
Danke für die Tips.
Ich habe das jetzt so gelöst:

Delphi-Quellcode:
procedure TChartData.SerieAdd(Value: Single);
begin
  if Assigned(ScopeSerie) then
  begin
    ScopeSerie.Delete(0);
    Chart.BottomAxis.Maximum := Chart.BottomAxis.Maximum + 1;
    Chart.BottomAxis.Minimum := Chart.BottomAxis.Minimum + 1;
    ScopeSerie.AddXY(Chart.BottomAxis.Maximum, Value);
  end;
end;

procedure TChartData.SerieInit(Serie: TChartSeries; Title: string; MaxX, MaxY: Integer; Color: TColor);
var
  i : Integer;
begin
  Chart.BottomAxis.Automatic := False;
  Chart.BottomAxis.Maximum := MaxX;
  Chart.BottomAxis.Minimum := 1;
  Chart.LeftAxis.Automatic := False;
  Chart.LeftAxis.Maximum := MaxY;
  ScopeMin := 1;
  ScopeMax := MaxX;
  Serie.Color := Color;
  ScopeSerie := Serie;
  Chart.Title.Caption := Title;
  for i := 1 to MaxX do
    Serie.AddXY(i,0);
end;
Gruß Peter
  Mit Zitat antworten Zitat