Page 1 of 1

TPolar DrawZone

Posted: Thu May 28, 2009 10:34 am
by 10050873
Hello,

I an trying to use a TPolar to drawzone like the picture here

but when i call this method nothing occur on my chart
Could it be possible to have help to begin it?

Thanks
Image

Posted: Thu May 28, 2009 11:11 am
by yeray
Hi Calou,

I'm afraid that this would be difficult to draw with the actual TeeCahrt series set. This is already in the wish list (TV52012610) and we'll try to implement it in further releases as several customers demanded for it.

Posted: Thu May 28, 2009 12:50 pm
by 10050873
Bad news for us :(

Could you explain a little more where is the problem because i saw that we can fill a zone?

Regards

Posted: Thu May 28, 2009 1:47 pm
by yeray
Hi Calou,

The principal problem is that with PolarGrid series you cannot define the length of each point so that it is uniform. Then tha only think you could do is simulate the effect filling more squares for high values.

Here is a simple example, only to show that this wouldn't be easy to achieve:

Code: Select all

uses TeeSurfa;

procedure TForm1.FormCreate(Sender: TObject);
var i, j: Integer;
begin
  Chart1.Legend.Visible := false;

  Series1.NumSectors := 18;
  Series1.NumTracks := 9;

  for i:=0 to Series1.NumSectors-1 do
  begin
    for j:=0 to Series1.NumTracks-1 do
    begin
      Series1.AddCell(i, j, clteecolor);
    end;
  end;

  Series1.Palette.UsePalette := true;
  Series1.Palette.UseColorRange := false;
  Series1.Palette.PaletteStyle := psPale;
  Series1.TreatNulls := tnDontPaint;
  Series1.Centered := false;

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

  for i:=0 to Series1.NumSectors-1 do
    Series1.ValueColor[i*Series1.NumTracks] := clWhite;    // center is formed for values index 0, 9, 18, 27,...

  Series1.ValueColor[1] := clNavy;
  Series1.ValueColor[2] := clNavy;
  Series1.ValueColor[3] := clBlue;
  Series1.ValueColor[4] := clBlue;
  Series1.ValueColor[5] := clSkyBlue;
  Series1.SetNull(6);
  Series1.SetNull(7);
  Series1.SetNull(8);

  Series1.ValueColor[10] := clNavy;
  Series1.ValueColor[11] := clBlue;
  Series1.ValueColor[12] := clBlue;
  Series1.ValueColor[13] := clSkyBlue;
  Series1.ValueColor[14] := clSkyBlue;
  Series1.ValueColor[15] := clLime;
  Series1.SetNull(16);
  Series1.SetNull(17);
end;