-
-
Notifications
You must be signed in to change notification settings - Fork 407
Open
Labels
type: bugSomething isn't correct or isn't workingSomething isn't correct or isn't working
Milestone
Description
With the following code, the hover tooltip only shows up for the first element:
screenrecord-2023-11-09_15.42.21.mp4
import holoviews as hv
import pandas as pd
import panel as pn
hv.extension("bokeh")
color_dim = hv.dim("category").categorize(
categories={"B": "red", "A": "blue", "C": "green"}, default="grey"
)
data = pd.DataFrame(
{"x": range(5), "y": range(5), "category": ["A", "B", "A", "C", "B"]}
)
def inner(value):
el = (
hv.Dataset(data)
.to(hv.Points, kdims=["x", "y"], groupby="category")
.opts(tools=["hover"], size=10)
)
if value:
el = el.get(value)
el.opts(color=color_dim, show_legend=False, xlim=(-1, 6), ylim=(-1, 6))
return el.overlay()
w1 = pn.widgets.MultiSelect(value=["A"], options=list("ABC"))
pn.Column(w1, hv.DynamicMap(inner, streams=[w1.param.value])).servable()
If I change the default value of the widget to A and B, those values show up.
hiroshi80 and TheoMathurin
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't correct or isn't workingSomething isn't correct or isn't working
Type
Projects
Status
Wishlist