I want to make interactive plot in django views (or model ?). Let's say I want to use selection_histogram example. I think Bokeh fit my needs because, I have matplot/seaborn that I can reuse and I'm not pretty good at javascript.
There was no problem for me to follow this example : how to embed standalone bokeh graphs into django templates.
As I understand, I need to run a bokeh server and make some proxy using nginx
How can I embed a interactive bokeh plot into a django view ?
I tried this :
Launch bokeh server
bokeh serve --allow-websocket-origin=127.0.0.1:8001 selection_histogram.py
Update my view in views.py
def simple_chart(request):
script = autoload_server(model=None,
app_path="/selection_histogram",
url="http://localhost:5006/")
return render(request, "simple_chart.html", {"the_script": script})
Now, it is interactive as expected.
Is there a way to pass some arguments to bokeh application ?
Any helps will be appreciated. Regards