How can I convert a point(x,y) from a mousemove event into a point of the chart x and Y axis?
Thanks in advance.
Marcel
How to convert a pixel point to a chart point
-
- Newbie
- Posts: 9
- Joined: Tue Jun 10, 2008 12:00 am
Hi Marcel,
I recommend you to use the axis function CalcPosPoint, for example:
I recommend you to use the axis function CalcPosPoint, for example:
Code: Select all
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Caption := 'X: ' + floattostr(Chart1.Axes.Bottom.CalcPosPoint(X)) + ' Y: ' + floattostr(Chart1.Axes.Left.CalcPosPoint(Y));
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 9
- Joined: Tue Jun 10, 2008 12:00 am