Hi Team,
I am trying to embed a bokeh plot into html. But i am not able to render. Hers is my code.
main.py
from bokeh.plotting import figure
from bokeh.io import curdoc
from bokeh.layouts import row
p = figure(title='One sample graph',
plot_width=700,
plot_height=700,
toolbar_location=None)
p.circle([1,2,3,4,5],[6,7,2,5,4], size=15)
curdoc().add_root(row(p, name='plotrow'))
index.html
{% extends base %}
{% block preamble %}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="https://fonts.googleapis.com/css?family=Noto+Sans" rel="stylesheet">
<link rel="stylesheet" href="app/static/special.css">
{% endblock %}
{% block contents %}
<title>Dashboard</title>
<div class="background">
<div class="header">
<h1>Text</h1>
<h2>Some more text</h2>
<p>Even more text</p>
</div>
<div class="bar"></div>
<div class="container">{{ embed(roots.plotrow) }}</div>
<div class="footer">
<p>Some extra text <br/>By someone</p>
</div>
</div>
{% endblock %}
I tried to run my bokeh using the following command(doing this on aws ubuntu vm). Plot is rendering but not embed into html template.
CMD: bokeh serve main.py --show
this is my plot. please have a look.
Please help me on this.
Thanks.