10-01-2010 08:10 AM
10-01-2010 08:25 AM
Hi Norbert,
in principle... it can be done using the function GetGraphCoordsFromPoint; but then you would need to compare these coordinates with all your plot data which seems quite time consuming; while it is possible displaying the mouse coordinates this way it will not work to correlate it with a graph in real time...
Wolfgang
10-01-2010 08:47 AM - edited 10-01-2010 08:47 AM
If you have Graph Cursors which are set to snap to the nearest plotted point, you can use GetGraphCursorIndex() to find which plot the point belongs to. It is then a simple matter to PlotText() with a suitable string at the cursor position, looping until the mouse button is released, and then DeleteGraphPlot() on the text just plotted.
JR
10-01-2010 10:09 AM
Attached simple project illustrates the approach. Not exactly a popup - you need to left-click on the graph to get the description, then right-click when you have finished with it. Note the cursor colour has been set to Transparent, to avoid unnecessary clutter.
JR
10-06-2010 07:40 AM
10-07-2010 12:38 PM
Norbert:
I took JR's excellent example and expanded on it to do ID by mouseover.
I key it off EVENT_MOUSE_POINTER_MOVE.
I get a graph coordinate from the mouse coordinates using GetGraphCoordsFromPoint().
I use SetGraphCursor() to put a cursor at the mouse pointer, but then I turn right around and use GetGraphCursor() to move the cursor to the closest point on any plot (without me having to talk to Mr. Pythagoras!).
For development and demo purposes, I added options to Plot new data (randomized or not), and ID by click or ID by mouseover.
Play with the attached example and see if that's an approach that works for you.
Thanks for the great start JR!
10-08-2010 03:10 AM
10-08-2010 09:34 AM - edited 10-08-2010 09:37 AM
Hi Norbert,
now that you found your solution you should mark the thread as solved. And you should even consider donating some kudos to Al and JR recognizing their efforts and time and providing such valuable feedback.