cave.utils.bokeh_routines module

cave.utils.bokeh_routines._prepare_nested_glyphs(glyph_renderers)[source]
cave.utils.bokeh_routines.array_to_bokeh_table(df, sortable=None, width=None, logger=None)[source]

Create bokeh-table from array.

Parameters
  • df (pandas.DataFrame) – dataframe with columns and index set

  • sortable (dict(str : boolean)) – columns that should be sortable, default none

  • width (dict(str : int)) – width of columns, default 100 for all

  • logger (logging.Logger) – logger to use, if not set use default

Returns

bokeh_table – bokeh object

Return type

bokeh.models.widgets.DataTable

cave.utils.bokeh_routines.get_checkbox(glyph_renderers, labels, max_checkbox_length=None)[source]
Parameters
  • glyph_renderers (List[List[Renderer]]) – list of glyph-renderers

  • labels (List[str]) – list with strings to be put in checkbox

  • max_checkbox_length (None or int) – maximum number of checkboxes in a single CheckboxButtonGroup, splits up the checkboxes over multiple CheckboxButtonGroups (e.g. to simulate “line-breaks” in the visual layout) NOTE: if this is not None, will return List[CheckboxButtonGroup]

Returns

  • checkbox (CheckboxButtonGroup or List[CheckboxButtonGroup]) – checkbox object (or list of checkbox-objects)

  • select_all (Button) – button related to checkbox

  • select_none (Button) – button related to checkbox

cave.utils.bokeh_routines.get_radiobuttongroup(glyph_renderers, labels)[source]
Parameters
  • glyph_renderers (List[List[Renderer]]) – list of glyph-renderers

  • labels (List[str]) – list with strings to be put in widget

Returns

radiobuttongroup – radiobuttongroup widget to select one of the elements

Return type

RadioButtonGroup