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]The hover tool is not disaplyed when the mouse is directly over text #9959

Closed
yuji38kwmt opened this issue Apr 26, 2020 · 0 comments · Fixed by #9960
Closed

[BUG]The hover tool is not disaplyed when the mouse is directly over text #9959

yuji38kwmt opened this issue Apr 26, 2020 · 0 comments · Fixed by #9960

Comments

@yuji38kwmt
Copy link

yuji38kwmt commented Apr 26, 2020

ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

  • bokeh 2.0.2
  • pandas 1.0.3
  • python 3.8.1
  • Firefox 75.0
$ uname -a
Linux example 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"

Description of expected behavior and the observed behavior

Expected behavior:

  • The hover tool is disaplyed when the mouse is directly over "Bob" text.

Observed behavior:

  • The hover tool was not disaplyed although the mouse is directly over "Bob" text.
  • TypeError: _ is undefined error occurred in browser JavaScript console output.

Complete, minimal, self-contained example code that reproduces the issue

from pandas import DataFrame
from bokeh.plotting import figure, show
from bokeh.models import ColumnDataSource

df = DataFrame({
    "name": ["Alice","Bob"],
    "x": [1,2],
    "y": [None,4],
})

TOOLTIPS = [
    ("name", "@name"),
    ("x", "$x"),
    ("y", "$y"),
]
fig = figure(tooltips=TOOLTIPS)
source = ColumnDataSource(data=df)
fig.text(
    x="x",
    y="y",
    source=source,
    text="name",
)
show(fig)

Stack traceback and/or browser JavaScript console output

TypeError: _ is undefined bokeh-2.0.2.min.js:423:1534
    _hit_point https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:423
    hit_test https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:254
    hit_test https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:246
    inspect https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:245
    _inspect https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:545
    _clear https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:545
    _move_exit https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:545
    _move_exit self-hosted:875
    r https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:471
    connect https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:233
    emit https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:176
    trigger https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:471
    _trigger https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:471
    map self-hosted:251
    _trigger https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:471
    _mouse_exit https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:471
    d https://cdn.bokeh.org/bokeh/release/bokeh-2.0.2.min.js:471

Screenshots or screencasts of the bug in action

image

Additional

Case that behave as expected

when y column does not contain None
df = DataFrame({
    "name": ["Alice","Bob"],
    "x": [1,2],
    "y": [2,4],
})

image

when first element of y column is not None.
df = DataFrame({
    "name": ["Alice","Bob"],
    "x": [1,2],
    "y": [2,None],
})
when circle method is used
fig.circle(
    x="x",
    y="y",
    source=source,
)
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.

2 participants