Setting size of a figure to a fraction of viewport

Hello!

When creating a bokeh.plotting.figure I am able to set a fixed width/height or set a sizing_mode. I am trying to implement a special use case that doesn’t seem to be covered by those.

Would it be possible somehow to set the width/height of a figure to a fraction of the viewport? For example, if I have a page with only this figure and I set this property to 1 it would be equivalent to “stretch_both”. If I have another figure at the top which also has this property set to 1 then the top one would occupy size equivalent of the browser and the user would be able to scroll down to see only the bottom figure.

Currently, if I create a layout of two rows with both figures being stretch_both, they would be squeezed together within the webpage.

I would be also fine with just being able to listen somehow to viewport size within bokeh server so that I could apply the transformation on width/height properties myself.

Let me know if I should get some example pictures to explain this better!