Autor Beitrag
xxx244
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 58

WIN XP SP2
Delphi 2005 Personal
BeitragVerfasst: Mi 22.09.04 13:47 
Ich möchte gerne mit der Komponente TChart Gramfiken bwz. Diagramme erstellen!Kann mir jemand erklären wie das geht?
Ich würde mich sehr über eine Antwort freuen.
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mi 22.09.04 14:37 
Hallo und :welcome: hier im Delphi-Forum.de!

Hier mal ein Beispiel von Andreas Rumsch welches ich mal vor langer langer Zeit ausprobiert habe:
ausblenden volle Höhe Series.pas
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
uses Series; 

// Creates two series in the chart and assigns random values 
// erzeugt zwei Serien im Chart und füllt sie mit zufälligen Werten 
procedure TForm1.Button1Click(Sender: TObject); 
var  
  i, j, kum: Integer; 
  s, t: TLineSeries; 
begin 
  with Chart1 do 
  begin 
    // Title of the Chart 
    Title.Text.Clear; 
    Title.Text.Add('Ein Titel für den Chart'); 

    // Create first Series 
    s := TLineSeries.Create(nil); 
    // Clear it 
    s.Clear; 
    // set the title 
    s.Title := 'Chart Linie 1'; 
    // determine the chart, this series belongs to 
    s.ParentChart := Chart1; 
    // the x-axis shall use date 
    s.XValues.DateTime := True; 

    // create the second Series 
    t := TLineSeries.Create(nil); 
    t.Clear; 
    t.Title       := s.Title + ' kum'; 
    t.ParentChart := Chart1; 
    t.XValues.DateTime := True; 
    // this series uses the right axis 
    t.VertAxis := aRightAxis; 

    // now add the random values 
    for i := 0 to 364 do 
    begin 
      j := Random(100); 
      s.AddXY(Date + i, j); 
      kum := kum + j; 
      t.AddXY(Date + i, kum); 
    end; 
  end; 
end;

Gruß
Tino
xxx244 Threadstarter
ontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic star
Beiträge: 58

WIN XP SP2
Delphi 2005 Personal
BeitragVerfasst: Mi 22.09.04 16:31 
Titel: Antwort
Hallo!
Danke für das schnelle Beispiel.
Ich werde es mal ausprobieren.
Euer Forum ist echt klasse.