casagui.bokeh.state._initialize

This contains functions to inject the casaguijs library into the generated HTML that is used to display the Bokeh plots that casagui’s applications produce

Module Contents

Functions

initialize_bokeh([bokehjs_subst])

Initialize bokeh for use with the casaguijs extensions.

casagui.bokeh.state._initialize.initialize_bokeh(bokehjs_subst=None)

Initialize bokeh for use with the casaguijs extensions.

The casaguijs extensions for Bokeh are built into a stand-alone external JavaScript file constructed for the specific version of Bokeh that is being used. Previously the CASA minified JavaScript libraries were loaded from the network. Now these libraries are included in a __js__ directory within the casagui Python package. If users need to debug JavaScript problems, non-minified versions can be copied into the __js__ directory to replace the existing libraries. To debug within the bokehjs library, a URL or a path can be supplied by the bokehjs_subst parameter and it will be substituted for the standard Bokeh library.

Parameters:

bokehjs_subst (None or str or list of str) – Bokeh dependent javascript library which is loaded after all other Bokeh libraries have been loaded. This path could be a local path, a URL or None. None is the default in which case it loads the published library for the current version of casaguijs and bokeh

Example

from casagui.bokeh.state import initialize_bokeh initialize_bokeh( bokehjs_subst=”/tmp/casaguijs.min.js” )