I can use the seriesclick event successfully to show user information about a point in the series they have clicked. I do this as below by accessing the valueindex property. I'd like to achieve the same functionality with the mouseover event, but cannot see how to do this. Any help much appreciated.
thank
Sean
Delphi 6 with Teechart Pro 7.01 registered user
procedure TForm1.seriesClick(Sender: TChartSeries; ValueIndex: Integer;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
Sender.ValueColor[ValueIndex]:=clred;
//do something here works fine
Chart.CancelMouse:=True;
end;
procedure TForm1.SeriesMouseEnter(Sender: TObject);
begin
//how do I get at the point with mouse over without
//having the value index to get at??
end;
point or line series onmouseover event
-
- Newbie
- Posts: 48
- Joined: Fri Mar 12, 2004 5:00 am
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi seanmurphy,
You need to do this getting the series index using Clicked method as you can see here:
You need to do this getting the series index using Clicked method as you can see here:
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
begin
Series1.ValueColor[Index]:=clRed;
Chart1.CancelMouse:=true;
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 |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 48
- Joined: Fri Mar 12, 2004 5:00 am