cave.utils.bokeh_routines module

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

Create bokeh-table from array.

Parameters
  • array (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

Returns

  • checkbox (CheckboxGroup or List[CheckboxGroup]) – checkbox object

  • 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