Callbacks#

Dashboard callbacks for interactivity.

register_callbacks(app: Dash, dashboard_instance: AttributionDashboard) → None[source]#

Register all interactive Dash callbacks on the application.

Wires up two callbacks: one that (re)builds the performance statistics table from dashboard_instance.summary_stats, and one that renders the chart for whichever analysis tab is active, reading its data from dashboard_instance. Both callbacks catch any exception and render an error message in place of the chart or table rather than letting the callback fail.

Parameters:
  • app (dash.Dash) – The Dash application to register callbacks on.

  • dashboard_instance (AttributionDashboard) – The dashboard instance whose precomputed data (returns, attribution, summary stats, etc.) backs the callbacks.