Page 1 of 1

Polar

Posted: Mon Nov 10, 2008 8:40 pm
by 10546144
Hi,

is it possible to configure the polar (or any other style) to look like that:
Image

That's what I got till now:
Image

So what's missing till now:
* the letters should be around the polar, not directly as labels on it
* the measure should be fix from 1 to 7
* the fields should be transparent... tried to set transparency value but did not help yet

Using TeeChart v8 VCL.

Posted: Tue Nov 11, 2008 8:43 am
by narcis
Hi afo,

You can achieve a similar chart using code below with OnGetCircleLabel event.

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  Series1.Circled:=true;
  Series1.Brush.Style:=bsSolid;
  Series1.Transparency:=50;
  Series1.Pointer.Visible:=false;
  Series1.CircleLabels:=true;
  Series1.GetVertAxis.SetMinMax(1,7);

  Series2.Brush.Style:=bsSolid;
  Series2.Transparency:=50;
  Series2.Pointer.Visible:=false;

  Chart1.Axes.Bottom.Visible:=false;
  Chart1.Axes.Top.Visible:=false;
  Chart1.Axes.Left.Visible:=false;

  for i:=0 to 35 do
  begin
    Series1.AddPolar(i*10, random(7), '#' + IntToStr(i));
    Series2.AddPolar(i*10, random(7), '#' + IntToStr(i));
  end;
end;

procedure TForm1.Series1GetCircleLabel(Sender: TCustomPolarSeries;
  const Angle: Double; Index: Integer; var Text: String);
var i: Integer;
begin
  if Sender = Series1 then
  begin
    i:=Series1.AngleValues.Locate(Angle);
    if i<>-1 then
      Text:=Series1.Labels[i]
    else
      Text:='';
  end;
end;
Hope this helps!