Page 1 of 1

Is this possible with TeeChart?

Posted: Sat Dec 29, 2007 3:19 pm
by 10547510
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

Posted: Wed Jan 02, 2008 10:25 am
by narcis
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;