Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]multi_line doesn't support hover. #10458

Closed
ruoyu0088 opened this issue Sep 3, 2020 · 1 comment · Fixed by #10459
Closed

[BUG]multi_line doesn't support hover. #10458

ruoyu0088 opened this issue Sep 3, 2020 · 1 comment · Fixed by #10459

Comments

@ruoyu0088
Copy link

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
@jstmn
Copy link

jstmn commented Nov 17, 2020

What was the resolution to this? I'm running bokeh 2.2.3 and am getting this issue.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants