Skip to content

Commit

Permalink
feat: change hover info
Browse files Browse the repository at this point in the history
Signed-off-by: taro-yu <[email protected]>
  • Loading branch information
taro-yu committed Sep 11, 2023
1 parent 40d15b7 commit ff88704
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/caret_analyze/plot/visualize_lib/bokeh/util/hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ def create_hover(self, options: dict[str, Any] = {}) -> HoverTool:
"""
tips_str = '<div style="width:400px; word-wrap: break-word;">'
for k in self.to_list():
tips_str += f'@{k} <br>'
if k == 'y':
tips_str += f'response time = @{k} <br>'
else:
tips_str += f'@{k} <br>'
tips_str += '</div>'

return HoverTool(
Expand Down Expand Up @@ -213,7 +216,7 @@ def to_list(self) -> list[str]:
elif isinstance(self._target_object, (Publisher, Subscription)):
hover_keys = ['legend_label', 'node_name', 'topic_name']
elif isinstance(self._target_object, Path):
hover_keys = ['legend_label', 'node_names', 'child_names']
hover_keys = ['legend_label', 'node_names', 'y']

return hover_keys

Expand Down

0 comments on commit ff88704

Please sign in to comment.