Page 1 of 1
Pb with TDragPointTool with TeeChart v7.05
Posted: Fri Nov 25, 2005 1:33 pm
by 9339785
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
Posted: Fri Nov 25, 2005 1:46 pm
by narcis
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?
Posted: Fri Nov 25, 2005 3:10 pm
by 9339785
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
Posted: Fri Nov 25, 2005 3:27 pm
by narcis
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.
Posted: Thu Dec 01, 2005 3:47 pm
by 9339785
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
Posted: Thu Dec 01, 2005 4:29 pm
by Pep
Hi Franck,
ok, I'm glad to know that works now.