HBox/VBox in BokehJS

Hello,
I’m picking up speed in building a web dashboard with Bokeh. Right now, I’m plucking out all of the components, and laying them out with my own HTML/CSS.

However, I think I could get a lot of the basic layout done with HBox and VBox, which work well from the Python side.

However, I’m unable to find documentation or an example of how to construct an HBox/VBox layout from the CoffeeScript/BokehJS side. Is there a JSFiddle or gist demonstrating this?

Best,

Alex

Hi Alex,

Developing a real JS interface for BokehJS (with docs and examples) is an ongoing concern. You can add your ideas or opinions to the GH issue here:

  https://github.com/bokeh/bokeh/issues/1515

In the mean time, there are a few possibilities. One is to use python to create the basic outline of all the plots and layout that you want, then keep the JS it generates, and throw the python away.

Another way is to build up the Bokeh object graph bAll of these objects in the Bokeh object graph are Backbone models, and they are exposed in the "Bokeh" module. So yo can do things like:

  mymodel = new Bokeh.VBox({
    children: [p1, p2, p3]
  })

Either way, you are going to want to create a new default view on the VBox (or HBox or Plot) model:

  var view = new mymodel.default_view({model: mymodel, el: '#my_plot_div_id'});
  
Where somewhere in the DOM you have:

  <div class="plotdiv" id="my_plot_div_id"></div>

The point of a real JS interface is to basically make all this tedious boilerplate go away, and to help wire up all the necessary plumbing. As I mentioned, if you have any input or thoughts on desired features or preferred spellings of things, please chime in on the GH issue.

Thanks,

Bryan

···

On Jan 1, 2015, at 7:06 AM, Alex W <[email protected]> wrote:

Hello,
I'm picking up speed in building a web dashboard with Bokeh. Right now, I'm plucking out all of the components, and laying them out with my own HTML/CSS.
However, I think I could get a lot of the basic layout done with HBox and VBox, which work well from the Python side.
However, I'm unable to find documentation or an example of how to construct an HBox/VBox layout from the CoffeeScript/BokehJS side. Is there a JSFiddle or gist demonstrating this?

Best,
Alex

--
You received this message because you are sy hand. ubscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/26d90741-df0f-447e-b596-130ee52cf35d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.