TAreaSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Alessandro
Newbie
Newbie
Posts: 9
Joined: Fri Jan 20, 2006 12:00 am

TAreaSeries

Post by Alessandro » Wed May 17, 2006 2:15 pm

I have a TAreaSeries.
With Stairs:=True the method Clicked(X,Y) doesn't work properly.
Thanks.

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

Post by Narcís » Wed May 17, 2006 2:22 pm

Hi Alessandro,

It works fine for me here using TeeChart Pro v7.07 and this code:

Code: Select all

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var index: Integer;
begin
  index:=Series1.Clicked(X,Y);

  if index<>-1 then Chart1.Title.Text[0]:=IntToStr(index);
end;

procedure TForm1.Series1Click(Sender: TChartSeries; ValueIndex: Integer;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  Chart1.Title.Text[0]:=IntToStr(ValueIndex);
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Series1.FillSampleValues();
  Series1.Stairs:=true;
end;
Which TeeChart version are you using? If the problem persists, could you please send us an example we can run "as-is" to reproduce the problem here?

Thanks in advance.
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

Alessandro
Newbie
Newbie
Posts: 9
Joined: Fri Jan 20, 2006 12:00 am

Post by Alessandro » Wed May 17, 2006 2:47 pm

I use TeeChart Pro v7.07. Where can I send you an example?

Thanks.

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

Post by Narcís » Wed May 17, 2006 3:01 pm

Hi Alessandro,

Sorry, I forgot to post that.

You can post your files at news://www.steema.net/steema.public.attachments newsgroup.

Thanks in advance.
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

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

Post by Narcís » Thu May 18, 2006 10:09 am

Hi Alessandro,

Thanks for the example.

It works fine for me here using v7.07. Please notice that for an area to be drawn you need 2 points, that's why in your example, which has 5 points, Series1.Clicked(X,Y) only returns values from 0 to 3.
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

Alessandro
Newbie
Newbie
Posts: 9
Joined: Fri Jan 20, 2006 12:00 am

Post by Alessandro » Thu May 18, 2006 1:39 pm

Hi,
I am goig to send you another example.
Please try to move your mouse over the red series....

Thanks.

Alessandro
Newbie
Newbie
Posts: 9
Joined: Fri Jan 20, 2006 12:00 am

Post by Alessandro » Thu May 18, 2006 1:51 pm

I have a problem sending you the attachment. Please can you modify the example as follows:

1) Clone the AreaSeries
2) Change the color of the new AreaSeries to blue and set Stairs:=False.
3) now you have two serieses: the first one is red with Stairs=True, the other one is blue with Stairs=False.
4) Try to move the mouse over the red series.

Thanks.

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

Post by Narcís » Thu May 18, 2006 2:30 pm

Hi Alessandro,

I've done that but all series indexes are still correct. Could you please try sending the example directly to me or make it available via http://www.yousendit.com?

Thanks in advance.
Last edited by Narcís on Wed Oct 04, 2006 11:07 am, edited 1 time in total.
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

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 May 19, 2006 7:29 am

Hi Alessandro,

We could finally reproduce the problem here. It can be sumarized with this code:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;

  Series1.Add(700);
  Series1.Add(1000);
  Series1.Add(500);
  Series1.Add(1000);
  Series1.Add(300);

  Series1.Stairs:=true;
end;

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
var index: Integer;
begin
  index:=Series1.Clicked(X,Y);

  if index<>-1 then Chart1.Title.Text[0]:=IntToStr(index)
  else Chart1.Title.Text[0]:='No Series';
end;
Moving the mouse around the top of each area section makes Clicked method return wrong values. This is a bug which I've added to our defect list (TV52011421) to be fixed for future releases.
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