Bar Serie question

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
lolo31
Newbie
Newbie
Posts: 19
Joined: Thu Mar 25, 2004 5:00 am

Bar Serie question

Post by lolo31 » Mon Feb 04, 2008 10:41 am

Hello,

How can I change the Yvalue of a bar (with the name of the bar as parameter)?

I have done :
Series1->AddBar(1, "Name", clTeeColor);

And I search something like :
Series1->YValues("Name") = 2;

And not :
Series1->YValues->Items[0] = 2;

Regards.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Feb 04, 2008 11:48 am

Hi lolo31,

Yes, you can do something like this:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Series1.AddBar(5, 'point1', clTeeColor);
  Series1.AddBar(6, 'point2', clTeeColor);
  Series1.AddBar(7, 'point3', clTeeColor);

  i:=Series1.Labels.IndexOfLabel('point2');

  Series1.YValue[i] := 10;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply