How do I do a color coded grid?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ChrisD
Newbie
Newbie
Posts: 1
Joined: Mon Dec 01, 2008 12:00 am

How do I do a color coded grid?

Post by ChrisD » Fri Feb 06, 2009 5:56 am

I wish to do a Risk Matrix grid, this is a 5 by 5 grid, in which each of the squares is color code. Then I will put bubbles, arrow or point on top.

How do I do the basic color coded grid?


Image

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Fri Feb 06, 2009 11:27 am

Hi ChrisD,

You could start with something like this:

Code: Select all

uses TeeSurfa;

procedure TForm1.FormCreate(Sender: TObject);
var Series1: TColorGridSeries;
i, j: integer;
begin
  Series1 := TColorGridSeries.Create(Chart1);
  Series1.ParentChart := Chart1;

  Chart1.View3D := false;

  Series1.StartColor := clRed;
  Series1.MidColor := clYellow;
  Series1.EndColor := clGreen;

  for i:= 0 to 4 do
    for j:= 0 to 4 do
      Series1.AddXYZ(i,i+j,j)
end;
I hope it helps.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply