holoviz / holoviz/hvplot

Support reactive expressions in arguments and options

Open
#1,288 6 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

Software version info


Python : 3.11.5 (main, Sep 11 2023, 08:31:25) [Clang 14.0.6 ]
Operating system : macOS-14.0-arm64-arm-64bit
Panel comms : default

holoviews : 1.18.3

bokeh : 3.3.4
colorcet : 3.0.1
dask : 2023.6.0
datashader : 0.16.0
geoviews : 1.11.0
hvplot : 0.9.2
IPython : 8.15.0
jupyterlab : 4.0.11
matplotlib : 3.8.0
notebook : 7.0.6
numba : 0.58.0
numpy : 1.24.3
pandas : 2.1.1
panel : 1.3.1
param : 2.0.1
pillow : 10.0.1
pyarrow : 11.0.0
pyviz_comms : 2.3.0
scipy : 1.11.3
spatialpandas : 0.4.9
xarray : 2023.6.0

I would expect reactive expressions (`pn.rx()`, `param.rx()`) to be treated the same as Panel Widgets and Param Parameters (i.e., support for all [Reactive References](https://github.com/holoviz/panel/blob/3600d25221a55b85360cb3028e685818f357d08b/doc/explanation/api/reactivity.md#reactive-references)), but only widgets and parameters seem to be accepted:

```python
import hvplot.pandas, pandas as pd, panel as pn
df = pd.DataFrame([6,2,9], [1,2,3])
e = pn.widgets.IntSlider(value=2, start=1, end=10, name="e")
pn.Column(e,df.hvplot.line(line_width=e))
```
image

```python
pn.Column(e,df.hvplot.line(line_width=e.param.value))
```
image

```python
pn.Column(e,df.hvplot.line(line_width=e.rx()))

AbbreviatedException: TypeError: __str__ returned non-string (type rx)
```

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.