Pb with TDragPointTool with TeeChart v7.05

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Pb with TDragPointTool with TeeChart v7.05

Post by franckgar » Fri Nov 25, 2005 1:33 pm

Hi,
I have a problem with TeeChart v7.05 (that was not with TeeChart v7.04 !) with the tool TDragPointTool.
I display 4 points with the series "TPointSeries" and I'm using the tool TDragPointTool to move these points, but in the v7.05 I can not anymore move some of them. I've the same problem with the function TPointSeries.Clicked(X, Y) : the function returns -1 when I click on some of them.

Any ideas of the pb? Perhaps a bug into the function TCustomSeries.Clicked(x,y:Integer) who has been modified into TeeChart v7.05.

Thanks.
Franck

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 Nov 25, 2005 1:46 pm

Hi Franck,

I'm not able to reproduce the problem here. Are there any specific steps I should follow?

Clicked method works fine here using this code:

Code: Select all

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if Series1.Clicked(X,Y)<>-1 then
    Chart1.Title.Text[0]:=IntToStr(Series1.Clicked(X,Y));
end;
Does it work at your 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

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Post by franckgar » Fri Nov 25, 2005 3:10 pm

you do not understand my problem. I try to use the tool "TDragPointTool" to move points and it does not work correctly. Sometimes I could move points, sometimes not.
I also said that I have the same problem with the function TPointSeries.Clicked(X, Y) on these points. I clicked on points and sometimes the function return -1 !!
Here is a screenshot of the chart : http://cjoint.com/?lzpZx6rOd8

in blue = TFastLinesSeries, in red = TLineSeries, green points with black border = TPointSeries, black line = TDrawLineTool.

I think the problem of the tool "TDragPointTool" comes from the function TCustomSeries.Clicked() who is bugged.
Do you have a better version of this function that I could use to correct my problem ?
Thanks
Franck

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 Nov 25, 2005 3:27 pm

Hi Franck,

I understand your problem. I've now tested using the series types you used in the screen-shot and works fine here, both TDragPointTool and Clicked method. Please notice that you need a drag point tool for each series assign a series to each tool.

Could you please send us an example we can run "as-is" or the .tee file for this screen-shot to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
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

franckgar
Advanced
Posts: 109
Joined: Thu Nov 04, 2004 5:00 am

Post by franckgar » Thu Dec 01, 2005 3:47 pm

Hi,
Just to tell you I found the problem : it was due to the call of the function TChartAxis.AdjustMaxMin() on the event TChart.OnMouseDown().
I don't know why but in my code this function generates strange behaviour of the mouse, as if the graph was switched of some pixel.
Regards
Franck

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

Post by Pep » Thu Dec 01, 2005 4:29 pm

Hi Franck,

ok, I'm glad to know that works now.

Post Reply