Skip to content

Instantly share code, notes, and snippets.

@fgoinai
Created November 20, 2017 14:30
Show Gist options
  • Save fgoinai/f8ddd048a28be6548eeff9c3545aa24c to your computer and use it in GitHub Desktop.
Save fgoinai/f8ddd048a28be6548eeff9c3545aa24c to your computer and use it in GitHub Desktop.
btn.callback = CustomJS(args=dict(btn0=btn0, btn1=btn1, a0=graphs0[0], a1=graphs0[1], b0=graphs1[0], b1=graphs1[1]), code="""
btn0.active = cb_obj.active;
a0.visible = (cb_obj.active.includes(0)) ? true : false;
a1.visible = (cb_obj.active.includes(1)) ? true : false;
btn1.active = cb_obj.active;
b0.visible = (cb_obj.active.includes(0)) ? true : false;
b1.visible = (cb_obj.active.includes(1)) ? true : false;
""")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment