Layouts#

Dashboard layout definitions.

create_main_layout(header_content: list, metrics: dict, attribution_summary_chart: Figure, decomposition_bar_chart: Figure) → Div[source]#

Assemble the dashboard’s top-level layout.

Composes the header, key metric cards, main charts row, performance statistics table placeholder, and analysis tabs into a single container.

Parameters:
  • header_content (list) – Dash HTML components making up the header, as produced by kaxanuk.attribution_analysis.dashboard.components.create_header_with_logo.

  • metrics (dict) – Mapping with keys total_return, annualized_return, sharpe_ratio, max_drawdown, annualized_vol, and skewness, as produced by AttributionDashboard._calculate_key_metrics.

  • attribution_summary_chart (plotly.graph_objects.Figure) – Figure rendered in the “Factor Attribution” chart panel.

  • decomposition_bar_chart (plotly.graph_objects.Figure) – Figure rendered in the “End-of-Period Decomposition” chart panel.

Returns:

The complete dashboard layout, ready to be assigned to dash.Dash.layout.

Return type:

dash.html.Div

create_tab_component(label: str, value: str) → Tab[source]#

Build a single styled tab for the dashboard’s analysis tab bar.

Parameters:
  • label (str) – Display text shown on the tab.

  • value (str) – Identifier used to select this tab in Dash callbacks (e.g. matched against analysis-tabs’s value property).

Returns:

A Tab component styled with get_tab_style / get_selected_tab_style.

Return type:

dash.dcc.Tab