cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Craige_Hales
Super User
Generate HTML and SVG with JSL

Thinking about @MikeD_Anderson's post https://community.jmp.com/t5/JMPer-Cable/How-to-make-Harvey-Balls-in-JMP-in-3-ways/ba-p/211434 .

This JSL builds SVG (scalable vector graphics) images and embeds them in an HTML table. < tr > makes a row in the table, < td > makes a cell in a row, and < img ...> puts an image into the cell. The rest is boiler-plate HTML. At the end, SaveTextFile returns a file name for open, which sees the .html extension and launches a browser.


html = "<html><body><table>";
step = 15;
For( start = 0, start < 360, start += step,
	html = html || "<tr>";
	For( end = start + step, end <= start + 360, end += step,
		gb = Graph Box(
			framesize( 30, 30 ),
			suppressaxes,
			Fill Color( "orange" );
			Pie( 5, 5, 95, 95, start, end );
			Arc( 5, 5, 95, 95, 0, 360 );
		);
		framebox = gb[FrameBox( 1 )];
		framebox << Left( 0 ) << top( 0 ) << Right( 0 ) << bottom( 0 );
		code = Right( Char( start + 1000 ), 3 ) || Right( Char( end + 1000 ), 3 );
		gb[framebox( 1 )] << savepicture( "$temp/aaa" || code || ".svg", "svg" );
		html = html || "<td><img src='aaa" || code || ".svg'></td>";
	);
	html = html || "</tr>";
);

html = html || "</table></body></html>";

Open( Save Text File( "$temp/aaa.html", html ) );

Interesting transitionInteresting transition

Last Modified: Jun 13, 2019 2:54 PM