Autor Beitrag
max120b
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WinXP, Linux 9.0
Delphi 2005 Professional
BeitragVerfasst: Mi 25.01.06 21:41 
Hallo.

Ich habe folgendes Problem:
Wenn ich mit

Chart1.Series[1].AddX(StrToInt(Form2.StringGrid1.Cells[1,1]),Form2.StringGrid1.Cells[1,1],clred);

der TChart Komponente einen neuen Eintrag hinzufügen möchte bekomme ich jedesmal den Fehler "Listenindex überschreitet das Maximum (1)".

Noch eine paar Infos:
Das StringGrid ist mit Zahlenwerten gefüllt und das Chart soll ein Balkendiagramm erzeugen.

Weis vielleicht jemand warum ich den Fehler bekomme oder sogar, was ich falsch mache?

Für eine Antwort wäre ich sehr dankbar.

Max120b
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Do 26.01.06 19:07 
Hallo

Die series sind wie jede übliche Liste 0 basierend, So wie dein code jetzt dasteht, müßte dein Chart 2 Series enthalten, tut es das?
entweder du erzeugst die Anzahl zur Entwurfszeit oder codemäßig zur Laufzeit (siehe OH und Forum)

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
max120b Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WinXP, Linux 9.0
Delphi 2005 Professional
BeitragVerfasst: Do 26.01.06 22:33 
Ahhh, danke.
Hat mir schon mal sehr geholfen. Jetzt bekomme ich keine Fehlermeldung mehr, aber nen Balken sehe ich trozdem net :(
max120b Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 33

WinXP, Linux 9.0
Delphi 2005 Professional
BeitragVerfasst: Fr 27.01.06 00:02 
Habs hinbekommen, hatte ausvershen 2 Serien angelegt, und die Falsche anzeigen lassen. *ups*

Danke für die Antwort, Keldorn. Hat mir sehr geholfen!