Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

go.FigureWidget responsiveness inside ipywidgets.Box

When I display a go.FigureWidget inside a jupyter notebook, it is usually responsive, but when I put this figure inside a ipywidgets.Box in order to create a dashboard, then the figure doesn’t automatically adjust its size.

I read that responsiveness can be controlled with the config arg of fig.show(), but fig.show() is not used for go.FigureWidget objects.

I tried to play with go.Layout() and ipywidgets.Layout() properties, but didn’t suceed.

Is there a way to achieve responsiveness of a go.FigureWidget() that is children of a ipywidgets.Box()?

Code to reproduce (in a notebook):

In [1]:

go.FigureWidget(go.Bar(y=[1, 2, 1]))

In [2]:

ipywidgets.Box([go.FigureWidget(go.Bar(y=[1, 2, 1]))], layout=Layout(border="solid"))