Hey Scripters - GB Hover labels displaying picture with file-name equal to coordinates of dot that you hover over...Hi all,
a customer had an interesting question I can't figure how to solve.
They use Graph Builder to plot data with x and y coordinates.
They now want to see a picture as hover label, corresponding to these coordinates.
They don't want to store the pictures in the table.
They want to view the picture by calling it via script from a their C-drive.
The question is: How could they build the script, that catches the coordinates from the point they are hovering over?
Any ideas or maybe somebody knows how that works would be great 
Best regards from Germany,
Florian
Re: Hey Scripters - GB Hover labels displaying picture with file-name equal to coordinates of dot that you hover over...Take a look at 'MouseTrap' in 'Help > Scripting Index'.
Re: Hey Scripters - GB Hover labels displaying picture with file-name equal to coordinates of dot that you hover over... Thank you @ian_jmp & @DonMcCormack , helpful tips.
I was able to solve the challenge by following Nascif's suggesstion (https://community.jmp.com/t5/Discussions/Hover-label/m-p/287358#M55474) to a similar question from the community.
It appears, that "local:_" denotes for the current values of coordinates you are hovering over. Then, it needs to be extracted as character.
This is the code snippet for the graph with the hover lables w. graphlets.
gb = dt <<
Graph Builder(
Level Spacing Color( "Gray" ),
Graph Spacing( 3 ),
Variables( X( :X ), Y( :Y ), Color( :Result ) ),
Elements( Points( X, Y, Legend( 8 ) )) ,
SendToReport(
Dispatch(
{},
"Graph Builder",
FrameBox,
{Set Graphlet(
Picture(PictureBox(Open( cwd || char(local:_X) || "-" || char(local:_Y) || ".jpg", "jpg"))),
Click(Web( "file://" || cwd || char(local:_X) || "-" || char(local:_Y) || ".jpg" ))
)}
)
)
);
This is the code that creates a hover label with a graphlet from a file on the C-drive, named by the coordinates of the point one is hovering over.
Best
Florian