diff --git a/examples/reference/panes/HoloViews.ipynb b/examples/reference/panes/HoloViews.ipynb index 336f454c00..a65b27542e 100644 --- a/examples/reference/panes/HoloViews.ipynb +++ b/examples/reference/panes/HoloViews.ipynb @@ -9,8 +9,7 @@ "import holoviews as hv\n", "import panel as pn\n", "\n", - "hv.extension(\"bokeh\")\n", - "pn.extension('plotly') # We add 'plotly' to be able to use the 'plotly' plot backend" + "hv.extension(\"bokeh\", \"plotly\")" ] }, { @@ -278,8 +277,13 @@ "outputs": [], "source": [ "plot = df.hvplot.scatter(x=\"group\", y=\"value\", height=300, responsive=True, title=\"Try changing the backend\")\n", + "\n", "plot_pane = pn.pane.HoloViews(plot, backend='bokeh', sizing_mode=\"stretch_width\", height=300)\n", - "widget = pn.widgets.RadioButtonGroup.from_param(plot_pane.param.backend, button_type=\"primary\", button_style=\"outline\")\n", + "\n", + "widget = pn.widgets.RadioButtonGroup.from_param(\n", + " plot_pane.param.backend, button_type=\"primary\", button_style=\"outline\"\n", + ")\n", + "\n", "pn.Column(widget, plot_pane)" ] }, @@ -416,7 +420,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Lets try to change the name of the `FloatSlider`." + "Lets try to modify the `FloatSlider` before we render it:" ] }, { @@ -426,7 +430,9 @@ "outputs": [], "source": [ "float_slider = hv_panel[1][0]\n", - "float_slider.name=\"Frequency (updated)\"\n", + "\n", + "float_slider.styles = {'border': '2px solid red', 'padding': '10px', 'border-radius': '5px'}\n", + "\n", "float_slider" ] }, diff --git a/panel/pane/holoviews.py b/panel/pane/holoviews.py index 201ecf800e..18b284cbc8 100644 --- a/panel/pane/holoviews.py +++ b/panel/pane/holoviews.py @@ -683,6 +683,7 @@ def widgets_from_dimensions(cls, object, widget_types=None, widgets_type='indivi **widget_kwargs) widget = widget_type(**widget_kwargs) if widget is not None: + widget.param.name.constant = True widgets.append(widget) if widgets_type == 'scrubber': widgets = [Player(length=nframes, width=550)]