neuralib.dashboard.examples.view_figure.AnimalFigureView

class neuralib.dashboard.examples.view_figure.AnimalFigureView[source]

Bases: View

__init__(animal=None, figure=None)[source]
Parameters:
  • animal (str | None)

  • figure (str | None)

Methods

__init__([animal, figure])

get_arg(key)

on_message(message, reset)

for logging purpose.

run_later(callback, *args, **kwargs)

run_periodic(cycle, callback, *args, **kwargs)

run_timeout(delay, callback, *args, **kwargs)

setup()

setup application top view.

update()

Top level UI components updating function.

Attributes

FIGURE_TYPE

current_animal

current_figure

title

content_title

content_date

document

FIGURE_TYPE = ['default', 'other', 'more']
content_title: Div
content_date: Div
__init__(animal=None, figure=None)[source]
Parameters:
  • animal (str | None)

  • figure (str | None)

property title: str
property current_animal: str | None
property current_figure: str
setup()[source]

setup application top view. This function is called by BokehServer only once when the server created and opened the web browser.

In this function, you need to initialize the UI components and return the layout.

Return type:

Model

get_arg(key)
Parameters:

key (str)

Return type:

list[str]

on_message(message, reset)

for logging purpose. i.e., TextAreaInput bokeh widget

Parameters:
  • message (str)

  • reset (bool)

run_later(callback, *args, **kwargs)
Parameters:

callback (Callable)

run_periodic(cycle, callback, *args, **kwargs)
Parameters:
  • cycle (int)

  • callback (Callable)

run_timeout(delay, callback, *args, **kwargs)
Parameters:
  • delay (int)

  • callback (Callable)

update()

Top level UI components updating function. This function is called by BokehServer when setup() has done.

In this function, you need to initialize the data and update the UI components’ state.

document: Document