holoviz / holoviz/hvplot

'hover_cols' are unvailable for the tooltips of a labelset

Open
#1,110 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.4k
Forks
124
Avg merge
1d 18h
Merged PRs (30d)
1

Description

#### ALL software version info
hvplot 0.8.2
bokeh 2.4.3
panel 0.14.3

#### Description of expected behavior and the observed behavior
I expect a custom tooltip to show the content of the designated column. This works as expected for the tooltip of points, but does not work for a labelset (showing "???").
.
What actually does work for a labelset is a tooltip with any of the variables that are used directly by the labelset: '@x', '@y', and '@text'. Maybe the 'hover_cols' keyword is not properly processed for a labelset?

#### Complete, minimal, self-contained example code that reproduces the issue
```
import hvplot.pandas
import panel as pn
import pandas as pd
from bokeh.models import HoverTool

df = pd.DataFrame({'label': ['a', 'b', 'c'], 'tooltip': ['aaa', 'bbb', 'ccc'], 'x': [1, 2, 3],'y': [2, 3, 1]})
hover = HoverTool(tooltips='@x - @tooltip')
plot_labels = df.hvplot.labels(x='x', y='y', text='label', hover_cols=['tooltip'], tools=[hover])
plot_points = df.hvplot.points(x='x', y='y', hover_cols=['tooltip'], tools=[hover])
pn.panel(plot_labels + plot_points).show()
```

#### Screenshots or screencasts of the bug in action
image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.