Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -798,7 +798,7 @@ def layout(**kwargs):
|
|
798 |
children=[
|
799 |
dmc.Button("Afficher les savoirs des métiers", mt=10, ml="auto", id="loading-skills", leftSection=DashIconify(icon="tabler:ikosaedr")),
|
800 |
html.Div(id="clicked-output-skills"),
|
801 |
-
html.Div(id="clicked-output-skills-tabs"),
|
802 |
], value="3"),
|
803 |
],
|
804 |
value="1",
|
@@ -1271,21 +1271,21 @@ def update_tableau(selectedData, array_value, theme):
|
|
1271 |
|
1272 |
return create_tableau(df_FT, theme)
|
1273 |
|
1274 |
-
clientside_callback(
|
1275 |
-
"""
|
1276 |
-
function updateLoadingState(n_clicks) {
|
1277 |
-
return true
|
1278 |
-
}
|
1279 |
-
""",
|
1280 |
-
Output("loading-button", "loading", allow_duplicate=True),
|
1281 |
-
Input("loading-button", "n_clicks"),
|
1282 |
-
prevent_initial_call=True,
|
1283 |
-
)
|
1284 |
|
1285 |
@callback(
|
1286 |
Output("clicked-output", "children"),
|
1287 |
Output("clicked-output-tabs", "children"),
|
1288 |
-
Output("loading-button", "loading"),
|
1289 |
Input("loading-button", "n_clicks"),
|
1290 |
Input(component_id='framework-multi-select', component_property='value'),
|
1291 |
Input("mantine-provider", "forceColorScheme"),
|
@@ -1359,7 +1359,7 @@ def load_from_stats(n_clicks, array_value, theme):
|
|
1359 |
fig_repartitionEntreprise = px.pie(df_repartitionEntreprise, names='Indicateur', values='Valeur', color='Indicateur', template=template, title="Répartition des embauches du métier : type entreprise du code ROME : " + array_label_rome[0]['label'], labels={'Valeur':'pourcentage'}, color_discrete_sequence=px.colors.qualitative.Safe).update_traces(textposition='inside', textinfo='percent+label').update_layout(font=dict(size=10),paper_bgcolor=paper_bgcolor)
|
1360 |
children.append(dmc.GridCol(html.Div(dcc.Loading(id="loadingPlot",children=(dcc.Graph(figure=fig_repartitionEntreprise)),type="default")), span=6))
|
1361 |
children_tabs.append(dmc.GridCol(html.Div(dcc.Loading(id="loadingPlot",children=[dbc.Label("Répartition des embauches du métier : type entreprise du code ROME : " + array_label_rome[0]['label']),dash_table.DataTable(data=df_repartitionEntreprise.to_dict('records'),sort_action='native', columns=[{'id': c, 'name': c} for c in df_repartitionEntreprise.columns],page_action='native', page_current= 0,page_size= 10,style_header=style_header,style_data=style_data,style_table={'overflowX': 'auto'},style_cell={'overflow': 'hidden','textOverflow': 'ellipsis','maxWidth': 0,})],type="default")), span=12),)
|
1362 |
-
return dmc.Grid(children=children), dmc.Grid(children=children_tabs)
|
1363 |
|
1364 |
#clientside_callback(
|
1365 |
# """
|
|
|
798 |
children=[
|
799 |
dmc.Button("Afficher les savoirs des métiers", mt=10, ml="auto", id="loading-skills", leftSection=DashIconify(icon="tabler:ikosaedr")),
|
800 |
html.Div(id="clicked-output-skills"),
|
801 |
+
#html.Div(id="clicked-output-skills-tabs"),
|
802 |
], value="3"),
|
803 |
],
|
804 |
value="1",
|
|
|
1271 |
|
1272 |
return create_tableau(df_FT, theme)
|
1273 |
|
1274 |
+
#clientside_callback(
|
1275 |
+
# """
|
1276 |
+
# function updateLoadingState(n_clicks) {
|
1277 |
+
# return true
|
1278 |
+
# }
|
1279 |
+
# """,
|
1280 |
+
# Output("loading-button", "loading", allow_duplicate=True),
|
1281 |
+
# Input("loading-button", "n_clicks"),
|
1282 |
+
# prevent_initial_call=True,
|
1283 |
+
#)
|
1284 |
|
1285 |
@callback(
|
1286 |
Output("clicked-output", "children"),
|
1287 |
Output("clicked-output-tabs", "children"),
|
1288 |
+
#Output("loading-button", "loading"),
|
1289 |
Input("loading-button", "n_clicks"),
|
1290 |
Input(component_id='framework-multi-select', component_property='value'),
|
1291 |
Input("mantine-provider", "forceColorScheme"),
|
|
|
1359 |
fig_repartitionEntreprise = px.pie(df_repartitionEntreprise, names='Indicateur', values='Valeur', color='Indicateur', template=template, title="Répartition des embauches du métier : type entreprise du code ROME : " + array_label_rome[0]['label'], labels={'Valeur':'pourcentage'}, color_discrete_sequence=px.colors.qualitative.Safe).update_traces(textposition='inside', textinfo='percent+label').update_layout(font=dict(size=10),paper_bgcolor=paper_bgcolor)
|
1360 |
children.append(dmc.GridCol(html.Div(dcc.Loading(id="loadingPlot",children=(dcc.Graph(figure=fig_repartitionEntreprise)),type="default")), span=6))
|
1361 |
children_tabs.append(dmc.GridCol(html.Div(dcc.Loading(id="loadingPlot",children=[dbc.Label("Répartition des embauches du métier : type entreprise du code ROME : " + array_label_rome[0]['label']),dash_table.DataTable(data=df_repartitionEntreprise.to_dict('records'),sort_action='native', columns=[{'id': c, 'name': c} for c in df_repartitionEntreprise.columns],page_action='native', page_current= 0,page_size= 10,style_header=style_header,style_data=style_data,style_table={'overflowX': 'auto'},style_cell={'overflow': 'hidden','textOverflow': 'ellipsis','maxWidth': 0,})],type="default")), span=12),)
|
1362 |
+
return dmc.Grid(children=children), dmc.Grid(children=children_tabs)
|
1363 |
|
1364 |
#clientside_callback(
|
1365 |
# """
|