I try to do a dashboard with streamlit, but I do not succeed to impact the graph with the filter. You can see what i did below :
year = st.sidebar.multiselect(
"select the year : ",
options=df2["Year"].unique(),
default=df2["Year"].unique(),
)
df_selection = df2.query("Year == @year")
fig = px.bar(df2, x="dpe", y="Percentage", color="signature",title="<b> DPE repartition in function of the year <b>")
fig.update_layout(plot_bgcolor="rgba(0,0,0,0)")
If you have any solution for this problem let me know thanks in advance.