Now I also need to use CheckboxButtonGroup or CheckboxGroup to control my plots in Bokeh like following, however, I cannot make it work either. Nothing happens when I click the checkboxes.
Create the widget
checkbox_group=CheckboxGroup(labels=my_ylabels,active=[0,1])
# Set up the callback
def update_fig1(attrname, old, new):
for n,nm in enumerate(['last_data','avg_data']):
sel=fig1.select(dict(name=nm))
sel[0].glyph.line_alpha= 1 if n in checkbox_group.active else 0
logging.debug(nm,“is”, “plotted” if n in checkbox_group.active else “hidden” )
checkbox_group.on_change(‘active’,update_fig1)
``
If you have some progress, would you like to share with me?
Thanks
B. R.
Gongming
···
On Sunday, August 9, 2015 at 2:38:32 PM UTC+8, TJ wrote:
On bokeh-server mode, is there any example of using CheckboxGroup
I am aware of this post and the posted python code works fine in notebook but I can not make it work at the bokeh-server mode.