Example of using holoviews TapStream with Panel

is there an example of using holoviews TapStream and panel? or something similar to using any stream and panel

Hi @ahuang11

Welcome to the community.

I don’t have an example using TapStream yet. But I have one using using RangeXY. You can find it as the KickStarterDashboard in the gallery at awesome-panel.org.

The code is here https://github.com/MarcSkovMadsen/awesome-panel/blob/master/src/pages/gallery/kickstarter_dashboard/main.py

1 Like

Here is a minimal example using the tap stream:

import panel as pn
import holoviews as hv

pn.extension()

points = hv.Points([])
stream = hv.streams.Tap(source=points, x=np.nan, y=np.nan)

@pn.depends(stream.param.x, stream.param.y)
def location(x, y):
    return pn.pane.Str(f'Click at {x:.2f}, {y:.2f}', width=200)

pn.Row(points, location)

2 Likes