To update something using the server change it’s property:
e.g.
from bokeh.layouts import row
row_1 = row(children=[hist1, hist2])
Then later
row_1.children = [hist_1_new, hist_2_new]
However, I believe there's a bug where you can't update nested
children. So in your case of a column of rows, you may have a
problem.
It works in the notebook because it's completely re-rendering the
whole thing I believe.
···
On 8/8/16 2:16 PM,
wrote:
I am writing a program which visualizes a set of histograms
on bokeh and updates them in real time. I want to be able to
add/take away variables from the program which will cause
either additional histograms to appear or existing histograms
to disappear.
I’ve got the first part running using the command
session = push_session(curdoc())
to set up the server document and
session.show(Column(*rows_of_histograms))
which causes the histograms to show up on a browser window.
As I update the data to the histograms they display on the
browser as I expected. However, when a new variable is
instantiated in the program and I need a new histogram to be
displayed. I’ve set the program to clear the display and show
the figures again so it calls
session.show(Column(*new_rows_of_histograms))
However, this doesn't seem to work. It works on the
notebook if I use output_notebook and push_notebook() but
doesn’t work on the server. Can anyone tell me what I’m doing
wrong or give me an alternative way to do this?
Thanks!
–
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].
To post to this group, send email to [email protected]. To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/73b700c2-cfba-4dfb-a854-1d846f50fb9f%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/73b700c2-cfba-4dfb-a854-1d846f50fb9f%40continuum.io?utm_medium=email&utm_source=footer). For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
–
Sarah Bird
Developer, Bokeh
[
![Continuum Analytics](http://docs.continuum.io/_static/img/ContinuumWordmark.png)
](http://continuum.io)