Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -845,40 +845,58 @@ if page == "Exploration des données":
|
|
| 845 |
y=df_count["Nombre de feux"],
|
| 846 |
text=df_count["Nombre de feux"].apply(lambda x: f"{x:,}"),
|
| 847 |
textposition="outside",
|
| 848 |
-
cliponaxis=False, # empêche le texte d’être coupé
|
| 849 |
textfont=dict(size=16, color="black"),
|
| 850 |
marker=dict(
|
| 851 |
color="#627CFF",
|
| 852 |
line=dict(color="black", width=1.5),
|
| 853 |
),
|
|
|
|
| 854 |
)
|
| 855 |
)
|
| 856 |
-
|
| 857 |
fig_top10_feux.update_layout(
|
| 858 |
-
title=
|
| 859 |
-
|
|
|
|
|
|
|
|
|
|
| 860 |
template="plotly_white",
|
| 861 |
plot_bgcolor="rgba(245,248,255,1)",
|
| 862 |
paper_bgcolor="rgba(245,248,255,1)",
|
| 863 |
|
| 864 |
-
# 🔑
|
| 865 |
-
margin=dict(l=80, r=80, t=160, b=120),
|
| 866 |
|
| 867 |
-
font=dict(
|
|
|
|
|
|
|
|
|
|
| 868 |
|
| 869 |
xaxis=dict(
|
| 870 |
-
title=
|
|
|
|
|
|
|
|
|
|
| 871 |
tickangle=-35,
|
| 872 |
-
tickfont=dict(size=16),
|
|
|
|
|
|
|
|
|
|
| 873 |
),
|
|
|
|
| 874 |
yaxis=dict(
|
| 875 |
-
title=
|
|
|
|
|
|
|
|
|
|
| 876 |
tickformat=",d",
|
| 877 |
-
tickfont=dict(size=16),
|
| 878 |
-
|
|
|
|
|
|
|
|
|
|
| 879 |
),
|
| 880 |
|
| 881 |
-
bargap=0.05
|
| 882 |
)
|
| 883 |
|
| 884 |
# fig_top10_feux = go.Figure(
|
|
|
|
| 845 |
y=df_count["Nombre de feux"],
|
| 846 |
text=df_count["Nombre de feux"].apply(lambda x: f"{x:,}"),
|
| 847 |
textposition="outside",
|
|
|
|
| 848 |
textfont=dict(size=16, color="black"),
|
| 849 |
marker=dict(
|
| 850 |
color="#627CFF",
|
| 851 |
line=dict(color="black", width=1.5),
|
| 852 |
),
|
| 853 |
+
cliponaxis=False # 🔑 évite le texte coupé
|
| 854 |
)
|
| 855 |
)
|
| 856 |
+
|
| 857 |
fig_top10_feux.update_layout(
|
| 858 |
+
title=dict(
|
| 859 |
+
text="🔥 Top 10 des départements avec le plus d’incendies",
|
| 860 |
+
font=dict(size=20, color="black"),
|
| 861 |
+
x=0.5
|
| 862 |
+
),
|
| 863 |
template="plotly_white",
|
| 864 |
plot_bgcolor="rgba(245,248,255,1)",
|
| 865 |
paper_bgcolor="rgba(245,248,255,1)",
|
| 866 |
|
| 867 |
+
margin=dict(l=90, r=90, t=160, b=130), # 🔑 plus d’espace en haut
|
|
|
|
| 868 |
|
| 869 |
+
font=dict(
|
| 870 |
+
size=16,
|
| 871 |
+
color="black" # 🔑 force le noir partout
|
| 872 |
+
),
|
| 873 |
|
| 874 |
xaxis=dict(
|
| 875 |
+
title=dict(
|
| 876 |
+
text="Département",
|
| 877 |
+
font=dict(size=18, color="black")
|
| 878 |
+
),
|
| 879 |
tickangle=-35,
|
| 880 |
+
tickfont=dict(size=16, color="black"),
|
| 881 |
+
showline=True,
|
| 882 |
+
linewidth=2,
|
| 883 |
+
linecolor="black"
|
| 884 |
),
|
| 885 |
+
|
| 886 |
yaxis=dict(
|
| 887 |
+
title=dict(
|
| 888 |
+
text="Nombre de feux",
|
| 889 |
+
font=dict(size=18, color="black")
|
| 890 |
+
),
|
| 891 |
tickformat=",d",
|
| 892 |
+
tickfont=dict(size=16, color="black"),
|
| 893 |
+
showline=True,
|
| 894 |
+
linewidth=2,
|
| 895 |
+
linecolor="black",
|
| 896 |
+
rangemode="tozero"
|
| 897 |
),
|
| 898 |
|
| 899 |
+
bargap=0.05
|
| 900 |
)
|
| 901 |
|
| 902 |
# fig_top10_feux = go.Figure(
|