callback from a CheckboxGroup to toggle between line and scatter methods

Hi,

I would like to add a checkbox to my bokeh interface to toggle between line and scatter methods.

I have try this following code but the CheckboxGroup does not have any callback argument.

from bokeh.plotting import figure
from bokeh.io import vform, show
from bokeh.models import CustomJS, ColumnDataSource
from bokeh.models.widgets import CheckboxGroup

x = [x*0.005 for x in range(0, 20)]
y = x

source = ColumnDataSource(data=dict(x=x, y=y))

plot = figure(plot_width=400, plot_height=400)

plot.line(‘x’, ‘y’, source=source, line_width=3, line_alpha=0.6)
plot.scatter(‘x’, ‘y’, source=source, line_width=3, line_alpha=0.6)

checkbox_group = CheckboxGroup(
labels=[“Scatter”], active=[0])

layout = vform(checkbox_group, plot)

show(layout)

Any idea ?

Thanks
Patrick

There is an issue on that.

So should be soon be possible.

Patrick