mirror of
https://github.com/fhswf/aki_prj23_transparenzregister.git
synced 2025-06-22 07:43:55 +02:00
Bug fixes v2
This commit is contained in:
@ -81,6 +81,15 @@ company_relation_type_filter = get_all_company_relations()["relation_type"].uniq
|
|||||||
def update_table(
|
def update_table(
|
||||||
metric_dropdown_value: str, metrics: pd.DataFrame
|
metric_dropdown_value: str, metrics: pd.DataFrame
|
||||||
) -> tuple[dict, list]:
|
) -> tuple[dict, list]:
|
||||||
|
"""_summary_.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
metric_dropdown_value (str): _description_
|
||||||
|
metrics (pd.DataFrame): _description_
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
tuple[dict, list]: _description_
|
||||||
|
"""
|
||||||
table_df = metrics.sort_values(metric_dropdown_value, ascending=False).head(10)
|
table_df = metrics.sort_values(metric_dropdown_value, ascending=False).head(10)
|
||||||
table_df = table_df[["designation", "category", metric_dropdown_value]]
|
table_df = table_df[["designation", "category", metric_dropdown_value]]
|
||||||
table_df.to_dict("records")
|
table_df.to_dict("records")
|
||||||
@ -314,6 +323,15 @@ def update_graph_data(
|
|||||||
person_relation_type: str = "HAFTENDER_GESELLSCHAFTER",
|
person_relation_type: str = "HAFTENDER_GESELLSCHAFTER",
|
||||||
company_relation_type: str = "GESCHAEFTSFUEHRER",
|
company_relation_type: str = "GESCHAEFTSFUEHRER",
|
||||||
) -> tuple[nx.Graph, pd.DataFrame, dict, list]:
|
) -> tuple[nx.Graph, pd.DataFrame, dict, list]:
|
||||||
|
"""_summary_.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
person_relation_type (str, optional): _description_. Defaults to "HAFTENDER_GESELLSCHAFTER".
|
||||||
|
company_relation_type (str, optional): _description_. Defaults to "GESCHAEFTSFUEHRER".
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
tuple[nx.Graph, pd.DataFrame, dict, list]: _description_
|
||||||
|
"""
|
||||||
# Get Data
|
# Get Data
|
||||||
person_df = get_all_person_relations()
|
person_df = get_all_person_relations()
|
||||||
company_df = get_all_company_relations()
|
company_df = get_all_company_relations()
|
||||||
@ -394,7 +412,7 @@ def update_figure(
|
|||||||
selected_metric,
|
selected_metric,
|
||||||
layout,
|
layout,
|
||||||
switch_edge_annotaion_value,
|
switch_edge_annotaion_value,
|
||||||
slider_value,# type: ignore
|
slider_value, # type: ignore
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
@ -421,6 +439,14 @@ def update_figure(
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
def update_Dropdown(datasource_value: str) -> str:
|
def update_Dropdown(datasource_value: str) -> str:
|
||||||
|
"""_summary_.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
datasource_value (str): _description_
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
str: _description_
|
||||||
|
"""
|
||||||
style = ""
|
style = ""
|
||||||
match datasource_value:
|
match datasource_value:
|
||||||
case "Company Data only":
|
case "Company Data only":
|
||||||
|
Reference in New Issue
Block a user