![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#2
|
|||
|
|||
|
Código:
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var xx, yy1, yy2: Double;
idx: TValuePos;
begin
{Screen coord -> Plot coord}
xx := Chart1.BottomAxis.CalcPosPoint(X);
{Binary search and interpolation (units in attachment) }
yy1 := ValueAt(ArrayAdapter(Series1, 'x'), ArrayAdapter(Series1, 'y'), xx);
{or}
if BinSearch(ArrayAdapter(Series2, 'x'), xx, idx)
then yy2 := ValueAt(ArrayAdapter(Series2, 'y'), idx)
else yy2 := NaN; // out of range
Caption := Format('%.3f %.3f %.3f', [xx, yy1, yy2]);
end;
Última edición por rounin fecha: 06-10-2008 a las 14:05:13. |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| mover VertScrollBar con la rueda del ratón (mouse) | TrUnkS | OOP | 3 | 27-02-2007 04:46:34 |
| Coordenadas TWebBrowser | Delar | Varios | 2 | 03-11-2006 21:26:23 |
| Coordenadas en el PaintBox | fabiof2000 | Gráficos | 2 | 27-09-2006 10:08:03 |
| pasar coordenadas gps a coordenadas builder | iaav1 | C++ Builder | 3 | 03-07-2006 19:59:02 |
| Representar coordenadas 3D | blueicaro | OOP | 5 | 20-04-2006 17:03:14 |
|