Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

How to set the layout to cover the whole space

I have 3 plots : two on the left side and one on the right side.
The one on the right side does not cover the whole space of its “div”.
I think I need to set the layout some way to do so.
How can I correctly set it up ?

Here is the jsfiddle :
https://jsfiddle.net/q8144576/1/

In fact if I do not use any layout, it plots as I expect but is there a way to do so using a layout ?

I manage to make it work by adding a layout2 variable having the same properties than the other layout variable. I do not really understand why but it works.

Here is the updated jfiddle.
https://jsfiddle.net/q8144576/2/

Ha right. plotly.js mutates a few things the layout object provided (including height and width) for performance reasons.

I added a few console logs to your first fiddle to help you figure out what’s going on: https://jsfiddle.net/q8144576/3/

1 Like

Thank you, I understood and it is clear now.

1 Like