Commit fd968edb authored by COUDRIN David's avatar COUDRIN David
Browse files

no pscript, should fix #19

parent 2a6b6a31
......@@ -166,21 +166,15 @@ def create_bokeh_plot(data, gui=False):
# small snippet to rerender axes when hiding species
callback = CustomJS(args=dict(fig=fig, legend=fig.legend[0]), code="""
var y_range = fig.y_range
y_range.have_updated_interactively = False
y_range.have_updated_interactively = false
y_range.renderers = legend.items.map(item => item.renderers[0].visible && item.renderers[0])
Bokeh.index[fig.id].plot_canvas_view.update_dataranges()
"""
)
"""
def callback(fig=fig, legend=fig.legend[0]):
y_range = fig.y_range
y_range.have_updated_interactively = False
y_range.renderers = [item.renderers[0] for item in legend.items if item.renderers[0].visible]
Bokeh.index[fig.id].plot_canvas_view.update_dataranges()
for item in fig.legend[0].items:
item.renderers[0].js_on_change("visible", CustomJS.from_py_func(callback))
"""
item.renderers[0].js_on_change("visible", callback)
return fig, cds
......
......@@ -125,7 +125,7 @@ then
fi
### Jupyter
packages='jupyter bokeh ipywidgets pscript'
packages='jupyter bokeh ipywidgets'
if hash pip3 2>/dev/null
then
if [[ -d ${HOME}/.local/bin || $release == "bionic" ]]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment