cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
lala
Level VII

How to add JSL to "Big Class.jmp" graphics using Hover Labels?

Start with the following JSL to generate the graph.
How to add JSL through Hover Labels to get cell name data Get "Big Class Families" file corresponding name data?

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
p1 = dt << Graph Builder(
	Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
	Elements( Bar( X, Y, Legend( 5 ), Response Axis( "X" ) ) )
);

2024-02-21_19-40-19.png

8 REPLIES 8
lala
Level VII

回复: How to add JSL to "Big Class.jmp" graphics using Hover Labels?

  • Need to add another JSL. For example:

Include("D:\test.jsl");

Thanks!

 

test.jsl:

dt = open("$sample_data/big class families.jmp","invisible");
overlay2 = dt:picture[1];// How do I get the name parameter that the cursor points to?
close(dt,nosave);
New Window("",V List Box(overlay2 ));
jthi
Super User

回复: How to add JSL to "Big Class.jmp" graphics using Hover Labels?

I suggest reading through JMP Help page regarding Hover labels Hover Labels (jmp.com).

-Jarmo
lala
Level VII

回复: How to add JSL to "Big Class.jmp" graphics using Hover Labels?

Thanks Experts!

I do need to add a script to Hover Labels.

Still not sure how to proceed?

 

lala
Level VII

回复: How to add JSL to "Big Class.jmp" graphics using Hover Labels?

I will simply imitate,
Take this
Include("D:\test.jsl");
Copy and paste it into the script of the hover TAB.
The image also pops up, but the correct name parameters are not correctly obtained.
Still don't know how to fix it.
Hope to get expert help.Thank you very much!

 

2024-02-21_20-56-54.png

lala
Level VII

回复: How to add JSL to "Big Class.jmp" graphics using Hover Labels?

I just paste in age =12, other ages don't work.How can all ages work?

 

Thanks!

jthi
Super User

回复: How to add JSL to "Big Class.jmp" graphics using Hover Labels?

Hold Ctrl when you right click and paste the graphlet. Each of the frameboxes have separate graphlets

Graph Builder(
	Variables(X(:height), Y(:weight), Group X(:age)),
	Elements(Points(X, Y, Legend(5)), Smoother(X, Y, Legend(6))),
	SendToReport(
		Dispatch({}, "Graph Builder", FrameBox, {Set Graphlet(Picture(Distribution(Nominal Distribution(Column(:age)))))}),
		Dispatch({}, "Graph Builder", FrameBox(2), {Set Graphlet(Picture(Distribution(Nominal Distribution(Column(:age)))))}),
		Dispatch({}, "Graph Builder", FrameBox(3), {Set Graphlet(Picture(Distribution(Nominal Distribution(Column(:age)))))}),
		Dispatch({}, "Graph Builder", FrameBox(4), {Set Graphlet(Picture(Distribution(Nominal Distribution(Column(:age)))))}),
		Dispatch({}, "Graph Builder", FrameBox(5), {Set Graphlet(Picture(Distribution(Nominal Distribution(Column(:age)))))}),
		Dispatch({}, "Graph Builder", FrameBox(6), {Set Graphlet(Picture(Distribution(Nominal Distribution(Column(:age)))))})
	)
)
-Jarmo
lala
Level VII

回复: How to add JSL to "Big Class.jmp" graphics using Hover Labels?

Thanks Experts!

I follow the sample files in the index combined with your tips.This can automatically implement each age plus script.

 

But the question that remains to be solved is how to use this test.jsl to automatically get the name parameters of the various locations to which the cursor is pointing?

 

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
gb = dt << Graph Builder(
	Variables( X( :weight ), Y( :height ), Group X( :age ), Color( :sex ) ),
	Elements( Bar( X, Y, Legend( 5 ), Response Axis( "X" ) ) )
);
frame=(gb<<report)[FrameBox(1)];frame<<Set Graphlet(Picture(loader=Include("D:\test.jsl"); hlp=loader:lazyLoad("hllPresets"); hlp:launchPie();),Title("Pie Preset"),Reapply(1));
frame=(gb<<report)[FrameBox(2)];frame<<Set Graphlet(Picture(loader=Include("D:\test.jsl"); hlp=loader:lazyLoad("hllPresets"); hlp:launchPie();),Title("Pie Preset"),Reapply(1));
frame=(gb<<report)[FrameBox(3)];frame<<Set Graphlet(Picture(loader=Include("D:\test.jsl"); hlp=loader:lazyLoad("hllPresets"); hlp:launchPie();),Title("Pie Preset"),Reapply(1));
frame=(gb<<report)[FrameBox(4)];frame<<Set Graphlet(Picture(loader=Include("D:\test.jsl"); hlp=loader:lazyLoad("hllPresets"); hlp:launchPie();),Title("Pie Preset"),Reapply(1));
frame=(gb<<report)[FrameBox(5)];frame<<Set Graphlet(Picture(loader=Include("D:\test.jsl"); hlp=loader:lazyLoad("hllPresets"); hlp:launchPie();),Title("Pie Preset"),Reapply(1));
frame=(gb<<report)[FrameBox(6)];frame<<Set Graphlet(Picture(loader=Include("D:\test.jsl"); hlp=loader:lazyLoad("hllPresets"); hlp:launchPie();),Title("Pie Preset"),Reapply(1));

D:\test.jsl

d9 = open("$sample_data/big class families.jmp","invisible");
overlay2 = d9:picture[1];// How do I get the name parameter that the cursor points to???
close(d9,nosave);
nw=New Window("",V List Box(overlay2 ));
Wait(3);nw<<Close Window;
jthi
Super User

回复: How to add JSL to "Big Class.jmp" graphics using Hover Labels?

There are a lot of different variables you have access to in hover label execution context, see Scripting Guide > Scripting Graphs > Hover Labels > Work with the Hover Label Execution Context

-Jarmo