Skip to content

Commit 66bfe47

Browse files
committed
Set responsive=True in config by default (without this, plotly won't fill it's container in v6)
1 parent 110f866 commit 66bfe47

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shinywidgets/_render_widget_base.py

+3
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ def set_layout_defaults(widget: Widget) -> Tuple[Widget, bool]:
178178
# so change that 60px default to 32px
179179
if layout.margin["t"] == 60: # pyright: ignore
180180
layout.margin["t"] = 32 # pyright: ignore
181+
# In plotly >=v6.0, the plot won't actually fill unless it's responsive
182+
if fill:
183+
widget._config = {"responsive": True, **widget._config} # type: ignore
181184

182185
widget.layout = layout
183186

0 commit comments

Comments
 (0)