From Pixel to Scale Example

procedure TForm1.VGraphMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

{Register the mouse position with the Graph. The graph will now remember where the mouse was clicked.}

begin

With Graph Do

begin

x1.Value:=xFromPix(x);

y1.value:=yFromPix(y);

VGraph.RegisterDatum(2,x1.Value,y1.Value);

end;

end;