shyft.dashboard.time_series.tools.table_tools

Classes

ExportTableDataButton([label, height, ...])

Tool to download all data shown in all figures where this tool is attached to!

TableTool([logger])

This object represents the base class of all figure tools

Exceptions

TableToolError

exception shyft.dashboard.time_series.tools.table_tools.TableToolError[source]

Bases: RuntimeError

class shyft.dashboard.time_series.tools.table_tools.TableTool(logger=None)[source]

Bases: BaseTool

This object represents the base class of all figure tools

__init__(logger=None)[source]
Parameters:

logger – optional logger

abstract on_bind(*, parent: Any)[source]

Abstract method which is call on bind to a parent

class shyft.dashboard.time_series.tools.table_tools.ExportTableDataButton(label: str = 'Download Table Data', height: int = 50, width: int = 150, padding: int | None = None, sizing_mode: str | None = None, logger=None)[source]

Bases: TableTool, Widget

Tool to download all data shown in all figures where this tool is attached to!

Two obstacles: - each obj/renderer in a figure has its own data source with own amount of time, value tuples - js callbacks and python callbacks in bokeh are not sync

Therefore: - for each renderer one separate csv file is downloaded - we create a bokeh PreText obj in addition to the download button, to which we attach a js callback for the download after the download the callback is removed again

__init__(label: str = 'Download Table Data', height: int = 50, width: int = 150, padding: int | None = None, sizing_mode: str | None = None, logger=None)[source]
Parameters:

logger – optional logger

on_bind(*, parent: Any) None[source]

Abstract method which is call on bind to a parent

on_click() None[source]
static js_callback(*, sources: List[ColumnDataSource], names: List[str], column_name_maps: List[Dict[str, str]], map_of_name_map: List[Dict[str, str]]) str[source]

Creates js to download all data from multiple data sources to multiple csv files

property layout_components: Dict[str, List[Any]]

Property to return all layout.dom components of an visualisation app such that they can be arranged by the parent layout obj as desired.

Returns:

layout_components as

Return type:

{‘widgets’: [], ‘figures’: []}

property layout: LayoutDOM