Skip to content

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

@yuji38kwmt

Description

@yuji38kwmt

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,
)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions