-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Description
bokeh 2.2.1
test code
from bokeh.models import ColumnDataSource, HoverTool
from bokeh.plotting import figure
from bokeh.io import show
source = ColumnDataSource(data=dict(xs=[[1, 2], [3, 4]], ys=[[1, 2], [2, 1]], name=['A', 'B']))
fig = figure()
lines = fig.multi_line('xs', 'ys', source=source)
hover = HoverTool(tooltips=[('name', '@name')], renderers=[lines])
fig.add_tools(hover)
show(fig)
when hover a line, the follow exception raised in devtool console:
7VM425 bokeh-2.2.1.js:40248 Uncaught TypeError: Cannot read property '0' of undefined
at HoverToolView._update (VM425 bokeh-2.2.1.js:40248)
at HoverToolView.new_slot (VM425 bokeh-2.2.1.js:7546)
at Signal.emit (VM425 bokeh-2.2.1.js:2699)
at SelectionManager.inspect (VM425 bokeh-2.2.1.js:10912)
at HoverToolView._inspect (VM425 bokeh-2.2.1.js:40164)
at HoverToolView._move (VM425 bokeh-2.2.1.js:40149)
at HoverToolView.<anonymous> (VM425 bokeh-2.2.1.js:34754)
at HoverToolView.new_slot (VM425 bokeh-2.2.1.js:7546)
at Signal.emit (VM425 bokeh-2.2.1.js:2699)
at UIEvents.trigger (VM425 bokeh-2.2.1.js:34925)
Here is the code that raise the exception:
let data_x = glyph._xs[i][j];
Here is some debug information in the console.
> glyph._xs
RaggedArray {offsets: Uint32Array(2), array: Float32Array(4)}
> glyph._xs[0]
undefined