ploteries.figure_handler.table_handler

Functions

markdown_escape(val[, level])

Classes

TableHandler(data_store, name, data_mappings)

This object creates a table from one or more data series, with one row (or column when transposed=True) per time step, and the fields specified by data dictionaries derived from the data series.

class ploteries.figure_handler.table_handler.TableHandler(data_store, name: str, data_mappings: Tuple[str, SliceSequence] | Dict[str, Tuple[str, SliceSequence]], transposed: bool = False, data_table_template=None, columns_kwargs: Dict[str, dict] = {}, sorting='ascending', decoded_data_def=None)

This object creates a table from one or more data series, with one row (or column when transposed=True) per time step, and the fields specified by data dictionaries derived from the data series. The simplest use case is to display data from a ploteries.serializable_data_handler.SerializableDataHandler data series.

The display uses the Dash DataTable class dash_table.DataTable. Note: use class FigureHandler to build Plotly Tables of type plotly.graphic_objects.Table.

In [1]: print('Hello world')
Hello world

In [2]: 
Parameters:
  • data_store – Source data store.

  • name – Name of the FigureHandler instance that will be used in the figure defs table.

  • data_mappings – A data series name / jztools.slice_sequence.SSQ_-producible pair, or a dictionary of such pairs. In the first case, the SSQ_ object is expected to produce a dictionary. In both cases, the SSQ_ objects are applied to each record retrieved from the corresponding data series (i.e., to each entry of data_store['data_series_name']['data']), and the dictionary keys will be the id for the columns argument of the dash_table.DataStore object (as well as the name by default, unless overwritten with argument columns_kwargs).

  • data_table_template – A dash.dcc.DataTable or derived dictionary specifying the template used to build the data table.

  • transposed – Whether to display the table in transposed form (where each record will appear as a column for the k-th time step).

  • sorting – Whether to display the data fields in ascending or descending order.

  • columns_kwargs – Dictionary mapping some or all data keys to extra kwargs to add to the corresponding dash_table.DataTable columns argument (see DataTable reference).

from_traces = None
get_data_names()

Returns a list of all unique data names that this figure is dependent on.

encode_params()

Produces the params field to place in the data_defs record.

property is_indexed

Specifies whether the figure depends on a single time index.