composeui.core.dashboard

Shorter dashboard code: a main view for a dashboard, and presets of ordinary views.

class composeui.core.dashboard.DashboardView[source]

Bases: MainView

A main view for a dashboard: wide, without the File menu of studies.

A subclass that saves studies sets has_file_menu = True and its extension.

width: ClassVar[PageWidth] = 2

the web content’s default width; a subclass sets it: width = PageWidth.WIDE

has_file_menu: ClassVar[bool] = False

whether the window has file_menu, the studies’ New, Open, Save, Save As and Exit; an app without studies, e.g. a viewer, sets it to False and leaves it out

__init__(*, is_visible=True, is_enabled=True, renderer=None, state_filepath=None, minimum_width=720, minimum_height=480, file_menu=NOTHING, file_view=NOTHING, status_bar=NOTHING, replace_file=NOTHING, loaded=NOTHING)

Method generated by attrs for class DashboardView.

Parameters:
Return type:

None

composeui.core.dashboard.bar_chart(title, categories, *, x_title='', y_title='', height=None)[source]

Get a view field’s default: a bar chart with a group of bars per category.

E.g. by_hour: ChartView = bar_chart("Pickups by hour", HOURS).

Parameters:
  • title (str)

  • categories (Iterable[str])

  • x_title (str)

  • y_title (str)

  • height (Optional[int])

Return type:

ChartView