bokeh / bokeh

Interactive Data Visualization in the browser, from Python

Home Page:https://bokeh.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] sizing mode issue with layout and nested rows, columns

cdi-mflanner opened this issue · comments

Software versions

Python version : 3.11.8 (main, Mar 18 2024, 14:53:19) [GCC 7.5.0]
IPython version : 8.8.0
Tornado version : 6.2
Bokeh version : 3.4.0
node.js version : (not installed)
npm version : (not installed)
jupyter_bokeh version : (not installed)
Operating system : Linux-5.4.0-1106-gcp-x86_64-with-glibc2.27

Browser name and version

No response

Jupyter notebook / Jupyter Lab version

No response

Expected behavior

figure to stretch width to accommodate nested layout

Observed behavior

layout issue can be observed on bokeh website; see url and scroll to multiple object plot

Example code

# plot scales to original aspect ratio based on available width
plot = figure(..., sizing_mode="scale_width")

# slider fills all space available to it
amp = Slider(..., sizing_mode="stretch_both")
## NOTE: This is not a fully reproducible example, this is pulled directly from the bokeh community website. 
# fixed sized for the entire column
widgets = column(..., sizing_mode="fixed", height=250, width=150)

# heading fills available width
heading = Div(..., height=80, sizing_mode="stretch_width")

# entire layout fills all space available to it
layout = column(heading, row(widgets, plot), sizing_mode="stretch_both")

Stack traceback or browser console output

No response

Screenshots

Again, this is pulled from the bokeh community website
image