-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathhtml_template.py
More file actions
34 lines (31 loc) · 871 Bytes
/
html_template.py
File metadata and controls
34 lines (31 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
html_template = """<!DOCTYPE html>
<html>
<head>
<!-- Import vega & vega-Lite (does not have to be from CDN) -->
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4"></script>
<!-- Import vega-embed -->
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
<title>{title}</title>
<style media="screen">
/* Add space between vega-embed links */
/* http://vega.github.io/vega-tutorials/airports/ */
.vega-embed .vega-actions a {{
margin-left: 1em;
visibility: hidden;
}}
.vega-embed:hover .vega-actions a {{
visibility: visible;
}}
</style>
</head>
<body>
<div id="vis"></div>
<script type="text/javascript">
var opt = {{
"mode": "vega-lite",
}};
vegaEmbed('#vis', {spec}, opt).catch(console.warn);
</script>
</body>
</html>"""