toEmbeddedHTML

fun toEmbeddedHTML(figure: Figure): String(source)

Produces an embeddable HTML fragment from a Figure — a <div> and inline <script> with no surrounding page structure. The caller is responsible for loading the Lets-Plot JS library once in the enclosing page's <head> via PlotHtmlHelper.scriptUrl.