Skip to content

Commit

Permalink
fix: use visible instead of toggleable since bokeh 3.4.0 (#520)
Browse files Browse the repository at this point in the history
* use visible instead of toggleable in bokeh

Signed-off-by: ISP akm <[email protected]>

* Decide whether or not to make visible by bokeh 3.4.0 or higher

Signed-off-by: ISP akm <[email protected]>

* for pytest

Signed-off-by: ISP akm <[email protected]>

* for pytest

Signed-off-by: ISP akm <[email protected]>

* for pytest

Signed-off-by: ISP akm <[email protected]>

---------

Signed-off-by: ISP akm <[email protected]>
  • Loading branch information
xygyo77 authored Aug 9, 2024
1 parent 3655d76 commit 8dce0e0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/caret_analyze/plot/visualize_lib/bokeh/util/hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
from logging import getLogger
from typing import Any

from bokeh import __version__ as bokeh_version
from bokeh.models import HoverTool

from packaging import version

from .....exceptions import InvalidArgumentError
from .....runtime import CallbackBase, Communication, Path, Publisher, Subscription

Expand Down Expand Up @@ -153,9 +156,14 @@ def create_hover(self, options: dict[str, Any] = {}) -> HoverTool:
tips_str += f'@{k} <br>'
tips_str += '</div>'

return HoverTool(
tooltips=tips_str, point_policy='follow_mouse', toggleable=False, **options
)
if version.parse(bokeh_version) >= version.parse('3.4.0'):
return HoverTool(
tooltips=tips_str, point_policy='follow_mouse', visible=False, **options
)
else:
return HoverTool(
tooltips=tips_str, point_policy='follow_mouse', toggleable=False, **options
)


class CallbackSchedBarKeys(HoverKeysBase):
Expand Down

0 comments on commit 8dce0e0

Please sign in to comment.