special rose graph

Ideas and wishes for TeeChart
Sean Palmer
Newbie
Newbie
Posts: 7
Joined: Wed Jun 27, 2007 12:00 am
Location: UK
Contact:

Post by Sean Palmer » Thu Feb 12, 2009 3:10 pm

Does the new TPolarGrid series handle the requested type of rose chart?

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

Post by Narcís » Thu Feb 12, 2009 3:38 pm

Hi Sean,

Not exactly even you may get a rose chart setting some cells color to be transparent (clNone) using series ValueColor array, for example:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var Sector, Track : Integer;
    tmp     : TChartValue;
    ValueIndex: Integer;
begin
  with Series1 do
  begin
    Clear;

    NumSectors:=40;
    NumTracks:=20;

    BeginUpdate;

    for Sector:=0 to NumSectors-1 do
        for Track:=0 to NumTracks-1 do
        begin
          tmp:=0.5*Sqr(Cos(Sector/(NumSectors*0.2)))+
                   Sqr(Cos(Track/(NumTracks*0.2)))-
                   Cos(Track/(NumTracks*0.5));

          ValueIndex:=AddCell(Sector,Track,tmp);

          if ((Sector=5) and (Track>10))then
            ValueColor[ValueIndex]:=clNone;
        end;

    EndUpdate;
  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