vue-bokeh
Version:
A wrapper around bokehjs embedded
44 lines (37 loc) • 973 B
HTML
{#
Renders Bokeh models into a basic .html file.
:param title: value for ``<title>`` tags
:type title: str
:param plot_resources: typically the output of RESOURCES
:type plot_resources: str
:param plot_script: typically the output of PLOT_SCRIPT
:type plot_script: str
:param plot_div: typically the output of PLOT_DIV
:type plot_div: str
Users can customize the file output by providing their own Jinja2 template
that accepts these same parameters.
#}
<html lang="en">
<head>
<meta charset="utf-8">
<title>{{ title if title else "Bokeh Plot" }}</title>
{{ bokeh_css }}
{{ bokeh_js }}
<style>
html {
width: 100%;
height: 100%;
}
body {
width: 90%;
height: 100%;
margin: auto;
}
</style>
</head>
<body>
{{ plot_div|indent(8) }}
{{ plot_script|indent(8) }}
</body>
</html>