Scatter Chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Thomas Klingler
Advanced
Posts: 103
Joined: Tue Mar 02, 2004 5:00 am
Location: Bad Wurzach
Contact:

Scatter Chart

Post by Thomas Klingler » Fri Jun 02, 2006 2:28 pm

How can I produce a scatter chart with lines joining successive points in the order they are input, as for example in MS EXCEL'S XY (Scatter) chart type.

Thanks Nick

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jun 02, 2006 2:40 pm

Hi Nick,

You can use a TLineSeries and make its pointer visible:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;
  Series1.FillSampleValues();
  Series1.Pointer.Visible:=true;
  Series1.Pointer.Style:=psDiamond;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

NickH
Newbie
Newbie
Posts: 23
Joined: Mon Mar 08, 2004 5:00 am

Scatter Chart

Post by NickH » Fri Jun 02, 2006 3:01 pm

Hi Narcis,

Will this chart in the order the data is input rather than in ascending x-axis order?

Thanks NickH

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Jun 02, 2006 3:24 pm

Hi NickH,

Then you may better use a TPoint3DSeries and something like this:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;
  With Series1 do
  begin
    AddXY(8,7);
    AddXY(1,4);
    AddXY(2,5);
    AddXY(7,3);
    AddXY(6,2);
    AddXY(5,7);
    AddXY(9,1);
    Pointer.Style:=psDiamond;
    Pen.Color:=Color;
  end;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply