Spider Chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
CrazyICE
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: AUSTRIA / Styria
Contact:

Spider Chart

Post by CrazyICE » Fri Oct 01, 2004 10:36 am

hi,
i'm new and i need help creating a spider chart displayed in the following image.

Image

it's necessary to create mor than 2 axes (4 sections). how do i create such a chart?

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Fri Oct 01, 2004 1:14 pm

Hi.

For actual chart you can use polar series with one of pre-defined brush styles. Adding custom axes is a bit more tricky, but I guess it could be done by manually drawing required arrows directly on chart Canvas by using one of it's drawing methods (Arrow or even combination of lineto+moveto). Please note that all drawing code should be placed in one of the Chart events. There are several examples about drawing custom objects available in Teechart demo. Also, several topics in this forum address similar problems when user has to manuallly draw objects on chart Canvas.
Marjan Slatinek,
http://www.steema.com

CrazyICE
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: AUSTRIA / Styria
Contact:

Post by CrazyICE » Fri Oct 01, 2004 1:49 pm

the arrows on the axes are not really important.
the important thing is that i get more axes than those shown in the image following.

Image

i used a TPolarSeries, which works fine. but how do i get additional axes like in the image in my first post. (two 45° axes)
this is the point which have to be solved!

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Oct 04, 2004 7:00 am

Hi,
i used a TPolarSeries, which works fine. but how do i get additional axes like in the image in my first post. (two 45° axes)
As Marjan said :
axes is a bit more tricky, but I guess it could be done by manually drawing required arrows directly on chart Canvas by using one of it's drawing methods (Arrow or even combination of lineto+moveto).

There's no way to add these axis type directly.

CrazyICE
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: AUSTRIA / Styria
Contact:

Post by CrazyICE » Tue Oct 12, 2004 3:10 pm

so what do i have to do to create such pseudo-axes?

who do i get the center of the chart?

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Oct 14, 2004 4:38 pm

Hi,

you could use similar code to the following :

Code: Select all

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
with Chart1 do
begin
  Canvas.Pen.Width := 2;
  Canvas.MoveTo(Chart1.Axes.Bottom.IStartPos,Chart1.Axes.Bottom.PosAxis);
  Canvas.LineTo(Chart1.Axes.bottom.IEndPos-50,55);
end;
end;

CrazyICE
Newbie
Newbie
Posts: 4
Joined: Fri Nov 15, 2002 12:00 am
Location: AUSTRIA / Styria
Contact:

Post by CrazyICE » Thu Oct 28, 2004 6:45 am

Pep wrote:Hi,

you could use similar code to the following :

Code: Select all

procedure TForm1.Chart1AfterDraw(Sender: TObject);
begin
with Chart1 do
begin
  Canvas.Pen.Width := 2;
  Canvas.MoveTo(Chart1.Axes.Bottom.IStartPos,Chart1.Axes.Bottom.PosAxis);
  Canvas.LineTo(Chart1.Axes.bottom.IEndPos-50,55);
end;
end;
sorry, but this code doesn't work! :(

the compiler does not know "Chart1.Axes.Bottom"!

i'm using D6 Enterprise with TeeChart 5.02

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Oct 28, 2004 2:41 pm

Hi,
the compiler does not know "Chart1.Axes.Bottom"!

i'm using D6 Enterprise with TeeChart 5.02
In that case you must use the old one (which still existing in the latest versions) :
Chart1.BottomAxis

Post Reply