Personalize st.bar_chart

Hi all,

I’m using Streamlit to show some data. I like the st.bar_chart, but I would love to personalize the chart (with different colors for each bar). I’m not able to do it. Do you have a suggestion on how this can be done?


Hi @guscianc,

Thanks for posting!

st.bar_chart is actually just a wrapper around st.altair_chart, so you can adjust the styling of the Altair chart and then pass the styled chart to st.bar_chart.

Caroline :balloon:

Hi @guscianc,

Exactly what @Caroline said!

Here’s a small example to help you doing that using Altair btw :upside_down_face: