I get the error:
“Uncaught TypeError: Cannot read property ‘set_value’ of undefined at e.n.TextView.e.draw_legend_for_index (bokeh-0.12.13.min.js:1)”
when I try to add a legend entry for text glyphs:
import bokeh.plotting as BPlotting
x = range(5)
y = x
t = [str(i) for i in y]
source = BPlotting.ColumnDataSource(data=dict(x=x, y=y, t=t))
p = BPlotting.figure()
p.circle(‘x’, ‘y’, source=source, muted_alpha=0.2, legend=‘circle’)
p.text(‘x’, ‘y’, source=source, text=‘t’, muted_alpha=0.2, legend=‘text’)
p.line(‘x’, ‘y’, source=source, muted_alpha=0.2, legend=‘line’)
p.legend.location = “top_left”
p.legend.click_policy = “mute”
BPlotting.output_file(‘text.html’)
BPlotting.show(p)
Note that even though the third legend item (‘line’) isn’t visible, it’s still clickable to toggle muting.
Bokeh bug? or am I doing something wrong?
thanks
albert.

