ploteries.cli_interface.figure_handler_hook

Classes

FigureHandlerHook(data_store[, ...])

Implements the interface (methods render_empty_figures() and create_callbacks())) required by the 'ploteries launch' CLI to access the figures in a data store.

class ploteries.cli_interface.figure_handler_hook.FigureHandlerHook(data_store, figure_layout_kwargs={}, graph_kwargs={}, slider_kwargs={})

Implements the interface (methods render_empty_figures() and create_callbacks())) required by the ‘ploteries launch’ CLI to access the figures in a data store.

handler_class

alias of FigureHandler

build_empty_html(figure_handler)

Builds figure without any data and accompanying html.

classmethod encoded_class_name()

Replaces ‘.’ characters with ‘|’ characters in class paths to make them compatible with Dash element ids.

classmethod create_callbacks(app_callback: Callable, get_hook: Callable[[str], FigureHandlerHook], callback_args: Dict[str, State | Input | Output])

Creates three pattern-matching callbacks (corresponding to the arrows below):

  • n_interval_input -> each slider-less figures

  • n_interval_input -> each slider -> each with-slider figures

These callbacks expect the following contents in the callback_args dictionary (besides interface_name_state, see create_callbacks()):

  • n_interval_input (Input): The Interval.n_intervals atttribute that that will trigger the auto-updates, e.g., Input('interval-component', 'n_intervals').

  • global_index_input_value (Input): The global index value that will trigger on-demand figure updates, e.g., Input('global-index-dropdown', 'value')

  • global_index_dropdown_options (Output): Options for global index dropdown menu, e.g., Output("global-step-dropdown", "options").

(See cli_interface.PloteriesLaunchInterface.create_callbacks() and abstract_hook.InterfaceHook.create_callbacks().)