Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
SamKing
Level III

JMP15 Gridlet to append hyperlink to graph builder points

I have successfully created graph builder charts where i can hover over a point and it shows a hyperlink to an image, this is a super cool feature of JMP15 that I just discovered.  But when i add 'Group X' variables I get multiple frame boxes and the number of them is variable based on my dataset. 

 

I've found that the gridlets seem to want to have a specific frame box called out in the JSL code though and I was hoping for a better way to deal with it.  I'm sure i can setup a loop to look for the framebox count but isn't there an easier way so the gridlet applies to any number of framebox?

Dispatch({},"Graph Builder",
			FrameBox( 3 ),
			{Set Gridlet(
				Annex(
					{{Matcher( "Link" ), value( :Image_Path[local:_firstRow] ),
					click( Web( Char( :Image_Path[local:_firstRow] ) ) )}}
				)
			)}
		)

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: JMP15 Gridlet to append hyperlink to graph builder points

Hi @SamKing,

 

I am glad to learn you are finding this feature useful. You are correct that gridlets (as well as the other hover label customizations introduced in JMP 15.0, textlets and graphlets) take a frame as context and therefore require this frame to be specified.

There is no wild card support, but by using XPath to get a list of all frames in a report and the JSL list broadcast support, you can add your gridlet to all frames using a method that will work for any number of levels in your group-by variable.

Here is a somewhat contrived example that illustrates this idea:

Names Default to Here(1);
dt = Open("$SAMPLE_DATA/Big Class Families.jmp");
gb = dt << Graph Builder(
	Variables( X( :name ), Y( :height ), Wrap( :sex ) ),
	Elements( Bar( X, Y, Legend( 5 ) ) )
);
frames = gb << xpath("//FrameBox");
frames << Set Gridlet(
	Annex(
		{{Matcher( "TheName" ), value( :name[local:_firstRow] ),
		click(
			Web( "https://wikipedia.com/wiki/" || :name[local:_firstRow] )
		)}}
	)
)

I hope this helps.

Cheers,

  Nascif

View solution in original post

1 REPLY 1
Highlighted

Re: JMP15 Gridlet to append hyperlink to graph builder points

Hi @SamKing,

 

I am glad to learn you are finding this feature useful. You are correct that gridlets (as well as the other hover label customizations introduced in JMP 15.0, textlets and graphlets) take a frame as context and therefore require this frame to be specified.

There is no wild card support, but by using XPath to get a list of all frames in a report and the JSL list broadcast support, you can add your gridlet to all frames using a method that will work for any number of levels in your group-by variable.

Here is a somewhat contrived example that illustrates this idea:

Names Default to Here(1);
dt = Open("$SAMPLE_DATA/Big Class Families.jmp");
gb = dt << Graph Builder(
	Variables( X( :name ), Y( :height ), Wrap( :sex ) ),
	Elements( Bar( X, Y, Legend( 5 ) ) )
);
frames = gb << xpath("//FrameBox");
frames << Set Gridlet(
	Annex(
		{{Matcher( "TheName" ), value( :name[local:_firstRow] ),
		click(
			Web( "https://wikipedia.com/wiki/" || :name[local:_firstRow] )
		)}}
	)
)

I hope this helps.

Cheers,

  Nascif

View solution in original post

Article Labels

    There are no labels assigned to this post.