Is this possible with TeeChart?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Tyrolean
Newbie
Newbie
Posts: 8
Joined: Tue Nov 27, 2007 12:00 am

Is this possible with TeeChart?

Post by Tyrolean » Sat Dec 29, 2007 3:19 pm

Hi!

I am using Teechart 8 VCL with Delphi 7. I should make a Graphic like the on attached - I tried a lot but didn't find any solution. Is such a Chart possible with Teechart?

Every color (red, green, grey) should be serie and it should work with TDateTime (for each Day, Month, Week, etc)

See a Screenshoot at Image
Gruß aus den Bergen
Günter

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

Post by Narcís » Wed Jan 02, 2008 10:25 am

Hi Günter,

Yes, this is possible creating 3 bar series at design time and doing something like this:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Series1.Marks.Visible:=false;
  Series2.Marks.Visible:=false;
  Series3.Marks.Visible:=false;

  Series1.XValues.DateTime:=true;
  Series2.XValues.DateTime:=true;
  Series3.XValues.DateTime:=true;

  Series1.UseYOrigin:=true;
  Series1.YOrigin:=0;
  Series2.UseYOrigin:=true;
  Series2.YOrigin:=0;
  Series3.UseYOrigin:=true;
  Series3.YOrigin:=0;

  Series1.MultiBar:=mbNone;
  Series2.MultiBar:=mbNone;
  Series3.MultiBar:=mbNone;

  Series1.BarWidthPercent:=100;

  for i:=0 to 5 do
  begin
    Series1.AddXY(Now+i, random-0.5);
    Series2.AddXY(Now+i, random-0.5);
    Series3.AddXY(Now+i, random-0.5);
  end;
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