W wsd Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-03 #1 chart1中有一条series,当鼠标在chart1移动时,可以显示鼠标处的坐标值, 关键是要在chart1 的鼠标处出现一个矩形提示框,中间能显示当前坐标值及其他一些信息.
H hntangwei Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-08 #3 试试在CHART中用OnMouseMove,然后取当前的值试试!
H hubdog Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-08 #4 procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin label3.caption:=inttostr(x); label4.caption:=inttostr; label1.caption:=floattostr(Chart1.LeftAxis.CalcPosPoint( x )); end;
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin label3.caption:=inttostr(x); label4.caption:=inttostr; label1.caption:=floattostr(Chart1.LeftAxis.CalcPosPoint( x )); end;
H hubdog Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-08 #5 更正: label1.caption:=floattostr(Chart1.LeftAxis.CalcPosPoint( y ));
H hubdog Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-08 #7 TChart.Showhint:=true; 再接管TapplicationEvents.onshowhint,根据mousepos改变hintinfo.hintpos 根据x,y改变hintstr,改变hintinfo.ReshowTimeout,HideTimeout使其显示时间长一些
TChart.Showhint:=true; 再接管TapplicationEvents.onshowhint,根据mousepos改变hintinfo.hintpos 根据x,y改变hintstr,改变hintinfo.ReshowTimeout,HideTimeout使其显示时间长一些
H hubdog Unregistered / Unconfirmed GUEST, unregistred user! 1999-10-08 #8 this method may be not godd,so I think use label1.left:=x; lable1.top:=y;