How to initialize interactive legend example with glyph hidden

Given the interactive legend example in the documentation, where p.legend.click_policy=“hide”, is it possible to initialize the graph with one of the lines already hidden, so the user has the ability to toggle it on by clicking the legend?

Thanks!

Hi,

just do:

p = figure(…)

line = p.line(…)

line.visible = False

···

2018-01-28 20:02 GMT+01:00 Paige McKenzie [email protected]:

Given the interactive legend example in the documentation, where p.legend.click_policy=“hide”, is it possible to initialize the graph with one of the lines already hidden, so the user has the ability to toggle it on by clicking the legend?

Thanks!

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/9373f148-fe31-4c9c-b2f0-fa9dc6670de1%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

David Laguardia