☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

drop down menu automatically updating

Community Support
saijena.17
saijena.17

Hello everyone, I am trying to bring/update new values to the drop down menu. The code shows the list to be updating but the server menu is not showing any update. Here is the code

from bokeh.io import curdoc

from bokeh.layouts import column

from bokeh.models import ColumnDataSource, Select

from bokeh.plotting import figure

import numpy as np

xi=[‘1’,‘2’]

i=2

def update():

global menu

global i

global xi

i=i+1

xi.append(str(i))

print(xi)

menu = Select(options=xi,value=xi[0], title='Bars')

update()

curdoc().add_periodic_callback(update, 20000)

layout = column(menu)

curdoc().add_root(layout)

⌁   Link to post

End of archived discussion · Replies are disabled