How to display the Y value of a data point when mouse over

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
QTech
Newbie
Newbie
Posts: 16
Joined: Wed Jul 02, 2008 12:00 am

How to display the Y value of a data point when mouse over

Post by QTech » Tue Jun 23, 2009 11:15 pm

How do I display the Y value of a data point when the mouse is over (on top of) the data point? I have TeeChart Standard v8.05.50522 Win32 on Delphi 2007.

Yeray
Site Admin
Site Admin
Posts: 9587
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to display the Y value of a data point when mouse over

Post by Yeray » Thu Jun 25, 2009 7:55 am

Hi QTech,

This would be easy with TeeChart Pro as it includes Mark Tips Tool that does exactly what you say.

In TeeChart Standard, you could use OnMouseMove event to test if the mouse is over a series point. You should call the series clicked method on every mouse movement to test if your series is under the new mouse position. Then, you'll have the series value index of the "clicked" point (or -1 if none) and you could use that at OnAfterDraw event to draw your custom rectangle with text where you want.

Let me remark that all this is what Mark Tips Tool makes for you in the Professional version and it also has other features, such as allowing you to define a mouse delay (delay before showing the mark) and a hide delay (time before hiding the mark).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply