Skip to content

Instantly share code, notes, and snippets.

@cocomoff
Created August 26, 2019 09:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cocomoff/25f8a9cd751acb4a72988d97f72a588e to your computer and use it in GitHub Desktop.
Save cocomoff/25f8a9cd751acb4a72988d97f72a588e to your computer and use it in GitHub Desktop.
bokeh example (index template)
<!DOCTYPE html>
<html>
<head>
<title>Flask Bokeh Sample</title>
{% autoescape False %}
{{ resources }}
{% endautoescape %}
</head>
<body>
<h1>Hello, Bokeh</h1>
<div id="myplot"></div>
<script>
fetch('/plot')
.then(function(res) { return res.json(); })
.then(function(item) { Bokeh.embed.embed_item(item, 'myplot'); })
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment