Skip to content Skip to sidebar Skip to footer

Bokeh: Chart From Pandas Dataframe Won't Update On Trigger

I have got a pandas dataframe whose columns I want to show as lines in a plot using a Bokeh server. Additionally, I would like to have a slider for shifting one of the lines agains

Solution 1:

Give this a try... change a=offset.value to a=cb_obj.get('value')

Then put source.trigger('change') after you do whatever it is you are trying to do in that update_data function instead of offset.on_change('value', update_data).

Also change offset = Slider(title="offset", value=0.0, start=-1.0, end=1.0, step=1, callback=CustomJS.from_py_func(offset))

Note this format I'm using works with flexx installed. https://github.com/zoofio/flexx if you have Python 3.5 you'll have to download the zip file, extract, and type python setup.py install as it isn't posted yet compiled for this version...


Post a Comment for "Bokeh: Chart From Pandas Dataframe Won't Update On Trigger"