ploteries.figure_handler.figure_handler

Classes

FigureHandler(data_store, name, figure_dict)

Instantiates a new figure handler.

class ploteries.figure_handler.figure_handler.FigureHandler(data_store, name: str, figure_dict, decoded_data_def=None)

Instantiates a new figure handler. Note that this does not read or write a figure handler from the data store (use methos from_name() and write_def() for this purpose).

Parameters:

figure_dict – Dictionary representation of a plotly figure containing placeholder values of type ploteries.data_store.Ref_ that will be replaced by data from the store when building the figure.

Todo

Example.

data_store = None
decoded_data_def = None
get_data_names()

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

classmethod from_def_record(data_store, data_def_record)

Initializes a data handler object from a raw (encoded) record from the data store’s data_defs table.

classmethod get_defs_table(data_store)

Returns the defs table (e..g., data_defs or figure_defs)

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.

classmethod from_traces(data_store, name: str, traces: List[Dict], default_trace_kwargs={}, layout_kwargs={}, connection=None)
Parameters:
  • traces – List of traces as dictionaries, potentially containing Ref_ references.

  • default_trace_kwargs – Default trace kwargs applied to input param traces.

  • layout_kwargs – Keyword args passed to go.Figure.update_layout().