Autoselecting the frist KPI if kpis are available (#539)

This commit is contained in:
2024-01-10 21:00:55 +01:00
committed by GitHub
parent 26292a9dea
commit 2df13e6896

View File

@ -89,6 +89,10 @@ def financial_metrics_layout(session: Session, selected_company_id: int) -> html
id="metrics-dropdown",
options=available_metrics,
placeholder="Kennzahl",
value=list(available_metrics.keys())[0]
if available_metrics
else None,
clearable=False,
),
],
),
@ -109,7 +113,6 @@ def financial_metrics_layout(session: Session, selected_company_id: int) -> html
Output("finance-fig", "children"),
Input("metrics-dropdown", "value"),
[State("store-finance-df", "data")],
prevent_initial_call=True,
)
def update_figure(value: str, data: str) -> html:
"""Update graph after selecting from dropdown.