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), but only widgets and parameters seem to be accepted:
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))
Taking the initial example, we can see the object returned is not a HoloViews element but a Panel object:
I think we weren't very happy with non-HoloViews objects returned by .hvplot() calls (there might be an issue on that topic). I also have some vague memory of us talking about deprecating some of that functionality, since it can be done with .interactive():
It seems to me this issue is part of the greater issue of figuring out what to do with .interactive() now param.rx exists that I put on hvPlot roadmap's for this year. Cc'ing @philippjfr since he may have some ideas 🙃
Software version info
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), but only widgets and parameters seem to be accepted:For completeness, note that
.apply.opts()
can also be used successfully here:Taking the initial example, we can see the object returned is not a HoloViews element but a Panel object:
I think we weren't very happy with non-HoloViews objects returned by
.hvplot()
calls (there might be an issue on that topic). I also have some vague memory of us talking about deprecating some of that functionality, since it can be done with.interactive()
:It seems to me this issue is part of the greater issue of figuring out what to do with
.interactive()
nowparam.rx
exists that I put on hvPlot roadmap's for this year. Cc'ing @philippjfr since he may have some ideas 🙃This was an exceptionally bad decision on my part and should be undone. I'm not sure how to undo it cleanly though.
Returning a Panel object, or allowing
.hvplot()
to accept widgets/parameters?Returning a Panel objects; eventually we do want to accepts reactive references and then apply them with
.apply.opts()
.Ok, noted.
Perhaps with starting to emit a deprecation warning for the current behavior, and add a parameter (maybe global) for users to opt in the new behavior.