Hello,
i have a bokeh plot embedded in a django app. I create the plot in the django view and push the plot to the bokeh server to show the plot in my webpage.
It all works quite good. Now I want to do a live plot, every time when a new DB-Entry is created the plot should be updated. I'm not sure what is the best way.
Is it a good practice to use a timer on the webpage to ask for now data?
Or is there a way to push the update form the server so that every currently connected client gets the plot update?
Hello,
i have a bokeh plot embedded in a django app. I create the plot in the django view and push the plot to the bokeh server to show the plot in my webpage.
It all works quite good. Now I want to do a live plot, every time when a new DB-Entry is created the plot should be updated. I'm not sure what is the best way.
Is it a good practice to use a timer on the webpage to ask for now data?
Or is there a way to push the update form the server so that every currently connected client gets the plot update?
i have a bokeh plot embedded in a django app. I create the plot in the django view and push the plot to the bokeh server to show the plot in my webpage.
It all works quite good. Now I want to do a live plot, every time when a new DB-Entry is created the plot should be updated. I’m not sure what is the best way.
Is it a good practice to use a timer on the webpage to ask for now data?
Or is there a way to push the update form the server so that every currently connected client gets the plot update?
I would be very thankful for every hint.
Thanks a lot.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
i have a bokeh plot embedded in a django app. I create the plot in the django view and push the plot to the bokeh server to show the plot in my webpage.
It all works quite good. Now I want to do a live plot, every time when a new DB-Entry is created the plot should be updated. I’m not sure what is the best way.
Is it a good practice to use a timer on the webpage to ask for now data?
Or is there a way to push the update form the server so that every currently connected client gets the plot update?
I would be very thankful for every hint.
Thanks a lot.
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
That early demo lapsed into non-functionality and was overly complicated by trying to do some specialized and advanced things with custom session creation. Most of these cases can probably now be more easily handled with things like HTTP request args. So I'd suggest starting with the general information about embedding, since embedding in Django is not going to be materially different from embedding in Flask or any other web framework:
That said, an explicit Django example would be a welcome addition to the examples or docs, in case you'd like to submit a contrition. None of the current core devs have any experience with Django.
Also check out the notebook where i document my learnings in making the app and how to update the data.
Basically you're going to need to keep track of your open sessions and put the new data in them, maybe using a django signal.
Best,
Sarah Bird
sb...@continuum.io
> On Apr 26, 2016, at 5:35 AM, das.ist....@gmail.com wrote:
>
> Hello,
> i have a bokeh plot embedded in a django app. I create the plot in the django view and push the plot to the bokeh server to show the plot in my webpage.
>
> #view.py
> def view_plot(request):
> f=figure()
> f.plot(#some data#)
> session = push_session(curdoc())
> context = {'script': autoload_server(f, session_id=session.id)}
> return render_to_response('plot.html', context=context)
>
>
> It all works quite good. Now I want to do a live plot, every time when a new DB-Entry is created the plot should be updated. I'm not sure what is the best way.
>
> Is it a good practice to use a timer on the webpage to ask for now data?
>
> Or is there a way to push the update form the server so that every currently connected client gets the plot update?
>
> I would be very thankful for every hint.
>
> Thanks a lot.
>
> --
> You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9dbfe7b2-a945-4767-bab4-f9da09c73e29%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.