How to synchronize document object with visualization in the browser ?

Hi,

I am now using the 0.11 server (bokeh serve). I have a callback on a TextInput widget and change the document object of that session in this callback function. But the change didn’t show up in the browser. Is there a way to populate the change on document in bokeh serve to the visualization in the browser ?

Thanks a lot

Hi,

Much more information and specifics (e.g what any how exactly you are running, and example code) are needed in order to try and help.

Thanks,

Bryan

···

On Jan 30, 2016, at 06:38, [email protected] wrote:

Hi,

I am now using the 0.11 server (bokeh serve). I have a callback on a TextInput widget and change the document object of that session in this callback function. But the change didn’t show up in the browser. Is there a way to populate the change on document in bokeh serve to the visualization in the browser ?

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].

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/f930652e-f2ea-42ff-9353-71600637d8ba%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Van de ven,

thanks a lot for the response. the code is

example.py

region = pd.read_csv(“region.csv”, encoding=“utf-8”).set_index(“plo_region”)

TS_LENGTH=360

fig = figure(plot_width=700, plot_height=500, y_axis_type=“log”,y_range=(10**-2, 10**3))

callback template

def callback_template(new, table, ts_length):

whatever behavior

def callback_region(attr, old, new):

callback_template(new, region, TS_LENGTH)

what to add line in callback function

curdoc().clear()

fig.line(x=[1,2,3], y=[1,2,3], legend=“sdfds”,color=“black”)

curdoc().add_root(hplot(inputs, fig))

textInput_region = TextInput(value=“”, title=“region:”)

textInput_region.on_change(“value”, callback_region)

controls = [textInput_region]

inputs = HBox(VBoxForm(controls), width=300)

put the button and plot in a layout and add to the document

curdoc().add_root(hplot(inputs, fig))

I start the server with

bokeh serve example.py

···

On Saturday, January 30, 2016 at 4:42:27 PM UTC+1, Bryan Van de ven wrote:

Hi,

Much more information and specifics (e.g what any how exactly you are running, and example code) are needed in order to try and help.

Thanks,

Bryan

On Jan 30, 2016, at 06:38, [email protected] wrote:

Hi,

I am now using the 0.11 server (bokeh serve). I have a callback on a TextInput widget and change the document object of that session in this callback function. But the change didn’t show up in the browser. Is there a way to populate the change on document in bokeh serve to the visualization in the browser ?

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].

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/f930652e-f2ea-42ff-9353-71600637d8ba%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.