mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-04-25 00:12:35 +02:00
Autoselecting the frist KPI if kpis are available (#539)
This commit is contained in:
parent
26292a9dea
commit
2df13e6896
@ -89,6 +89,10 @@ def financial_metrics_layout(session: Session, selected_company_id: int) -> html
|
|||||||
id="metrics-dropdown",
|
id="metrics-dropdown",
|
||||||
options=available_metrics,
|
options=available_metrics,
|
||||||
placeholder="Kennzahl",
|
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"),
|
Output("finance-fig", "children"),
|
||||||
Input("metrics-dropdown", "value"),
|
Input("metrics-dropdown", "value"),
|
||||||
[State("store-finance-df", "data")],
|
[State("store-finance-df", "data")],
|
||||||
prevent_initial_call=True,
|
|
||||||
)
|
)
|
||||||
def update_figure(value: str, data: str) -> html:
|
def update_figure(value: str, data: str) -> html:
|
||||||
"""Update graph after selecting from dropdown.
|
"""Update graph after selecting from dropdown.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user