datacipen commited on
Commit
a47801d
·
verified ·
1 Parent(s): c42967f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -793,6 +793,7 @@ def layout(**kwargs):
793
  dmc.Button("Afficher les statistiques des métiers", mt=10, ml="auto", id="loading-button", leftSection=DashIconify(icon="tabler:chart-pie")),
794
  html.Div(id="clicked-output"),
795
  html.Div(id="clicked-output-tabs"),
 
796
  ], value="2"),
797
  dmc.TabsPanel(
798
  children=[
@@ -1286,6 +1287,7 @@ def update_tableau(selectedData, array_value, theme):
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 +1361,9 @@ 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
  # """
 
793
  dmc.Button("Afficher les statistiques des métiers", mt=10, ml="auto", id="loading-button", leftSection=DashIconify(icon="tabler:chart-pie")),
794
  html.Div(id="clicked-output"),
795
  html.Div(id="clicked-output-tabs"),
796
+ html.Div(dmc.Text(id="html-output-tabs")),
797
  ], value="2"),
798
  dmc.TabsPanel(
799
  children=[
 
1287
  Output("clicked-output", "children"),
1288
  Output("clicked-output-tabs", "children"),
1289
  #Output("loading-button", "loading"),
1290
+ Output("html-output-tabs", "children"),
1291
  Input("loading-button", "n_clicks"),
1292
  Input(component_id='framework-multi-select', component_property='value'),
1293
  Input("mantine-provider", "forceColorScheme"),
 
1361
  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)
1362
  children.append(dmc.GridCol(html.Div(dcc.Loading(id="loadingPlot",children=(dcc.Graph(figure=fig_repartitionEntreprise)),type="default")), span=6))
1363
  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),)
1364
+
1365
+ html_chiffres_cles = table[0] + table[1] + table[2] + table[3] + table[4]
1366
+ return dmc.Grid(children=children), dmc.Grid(children=children_tabs), html_chiffres_cles
1367
 
1368
  #clientside_callback(
1369
  # """