Survey banner
The Dataiku Community is moving to a new home! We are temporary in read only mode: LEARN MORE

How to use Buttons from Bokeh widgets interactive

Level 2
How to use Buttons from Bokeh widgets interactive

I m trying to implement a dropdown button into my bokeh script. I have a map with dots with labels. Now i want to change the displayed labels according to the selection in the dropdown.

I m getting the button displayed, but changes are not commited. My guess is that the bokeh server is exiting after running the skript.

According to bokeh i would have to use "show" or bokeh serve command in command line and use the session object in my code.
Both possibilitys dont work in dataiku webapp.

What can i do?

Here is what i was using:


menu = [("jetzt", "0"),("+1 Stunden", "1"), ("+2 Stunden", "2"), ("+3 Stunden", "3"),("+4 Stunden", "4"),("+5 Stunden", "5")]
dropdown = Dropdown(label="Uhrzeit auswählen", button_type="warning", menu=menu)

def function_to_call(new):
print dropdown.value
print new


#call to show() ignored when running scripts with the 'bokeh' command.

curdoc().add_root(row(widgetbox(dropdown), width=800))
0 Kudos
0 Replies


Labels (3)
A banner prompting to get Dataiku