Page 2 of 2

Posted: Thu Feb 12, 2009 3:10 pm
by 10545774
Does the new TPolarGrid series handle the requested type of rose chart?

Posted: Thu Feb 12, 2009 3:38 pm
by narcis
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;