☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

new components method

Community Support
Schaun_Wheeler
Schaun_Wheeler

I’ve seen some talk on this group and on Github about a new “components” method coming out in 0.9.1 that will make layout less dependent upon HBox/VBox. I’d like to learn more - is there any documentation/explanation/example of what that will look like yet?

⌁   Link to post
Sarah_Bird3
Sarah_Bird3

An example of it in action is in this PR: https://github.com/bokeh/bokeh/pull/2468

Each of the dictionary values is an actual plot object and then we pass them into a template for rendering

spectrogram_plots = {
    'freq_slider': freq_slider,  # slider
    'gain_slider': gain_slider,  # slider
    'spec': spec,  # image
    'spectrum': spectrum,  # line
    'signal': signal,  # line
    'equalizer': eq  # radial
}

script, divs = components(spectrogram_plots)

     html = flask.render_template("spectrogram.html", bokeh=bokeh, script=script, divs=divs)

We use the divs throughout the html template like this: {{ divs.freq_slider|safe }} etc.

You can see the full template here: https://github.com/birdsarah/bokeh/blob/spectrogram/examples/embed/spectrogram/templates/spectrogram.html

···

On Wed, Jul 1, 2015 at 3:24 PM, Schaun Wheeler schaun.wheeler@gmail.com wrote:

I’ve seen some talk on this group and on Github about a new “components” method coming out in 0.9.1 that will make layout less dependent upon HBox/VBox. I’d like to learn more - is there any documentation/explanation/example of what that will look like yet?

–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/d809d125-4386-467f-b63c-789b9dd358a8%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled