cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
jj200812
Level I

JMP17 interactive html working with Save As but can;t re-create in code only

Hello, 

 

I have successfully made an interactive html report when doing the File -> SaveAs method, however, I'm having issues getting the interactive html to show the data filters when saving in jsl code. Can someone take a look and see if I'm missing something obvious here?

 

Here is the code I'm using:

JMP17

v2 = dtconcat << Graph Builder(
	Size(951, 734),
	Show Control Panel(0),
	Variables(X(:TIME), Y(:Something), Overlay(:label)),
	Elements(Points(X, Y, Legend(11)), Smoother(X, Y, Legend(12))),
	Local Data Filter(
		Show Modes(1),
		Count Excluded Rows(0),
		Mode(Include(0)),
		Add Filter(
			columns(:label, :"otherlabel"n),
			Display(:label, N Items(15), Find(Set Text(""))),
			Display(:"otherlabel"n, N Items(5))
		)
	)
);
 
v2 << save interactive html("path\path1\path2\test.html");
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: JMP17 interactive html working with Save As but can;t re-create in code only

You might have to wrap it to new window first or take higher level reference to capture also filter

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

nw = New Window("Graph Builder",
	gb = dt << Graph Builder(
		Size(525, 454),
		Show Control Panel(0),
		Variables(X(:weight), Y(:height), Overlay(:sex)),
		Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
		Local Data Filter(
			Show Modes(1),
			Mode(Include(0)),
			Add Filter(columns(:age), Display(:age, N Items(6)))
		)
	)
);


nw << Save Interactive HTML("$TEMP/test.html");
nw << Close Window;

Web("$TEMP/test.html");

jthi_0-1711561727529.png

With higher (or rather highest in this case) level reference

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(
	Size(525, 454),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
	Local Data Filter(
		Show Modes(1),
		Mode(Include(0)),
		Add Filter(columns(:age), Display(:age, N Items(6)))
	)
);

topref = (gb << top parent);
topref << Save Interactive HTML("$TEMP/test.html");

Web("$TEMP/test.html");
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: JMP17 interactive html working with Save As but can;t re-create in code only

You might have to wrap it to new window first or take higher level reference to capture also filter

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

nw = New Window("Graph Builder",
	gb = dt << Graph Builder(
		Size(525, 454),
		Show Control Panel(0),
		Variables(X(:weight), Y(:height), Overlay(:sex)),
		Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
		Local Data Filter(
			Show Modes(1),
			Mode(Include(0)),
			Add Filter(columns(:age), Display(:age, N Items(6)))
		)
	)
);


nw << Save Interactive HTML("$TEMP/test.html");
nw << Close Window;

Web("$TEMP/test.html");

jthi_0-1711561727529.png

With higher (or rather highest in this case) level reference

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt << Graph Builder(
	Size(525, 454),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11))),
	Local Data Filter(
		Show Modes(1),
		Mode(Include(0)),
		Add Filter(columns(:age), Display(:age, N Items(6)))
	)
);

topref = (gb << top parent);
topref << Save Interactive HTML("$TEMP/test.html");

Web("$TEMP/test.html");
-Jarmo
jj200812
Level I

Re: JMP17 interactive html working with Save As but can;t re-create in code only

Thanks Jarmo! I also found this previous post which captures your idea. It works now!

Solved: Missing Local Data Filter in "Save Interactive HTML()" Script - JMP User Community