TPolar DrawZone

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

TPolar DrawZone

Post by Calou » Thu May 28, 2009 10:34 am

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

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

Post by Yeray » Thu May 28, 2009 11:11 am

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.
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

Calou
Advanced
Posts: 104
Joined: Wed Nov 19, 2008 12:00 am

Post by Calou » Thu May 28, 2009 12:50 pm

Bad news for us :(

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

Regards

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

Post by Yeray » Thu May 28, 2009 1:47 pm

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