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?

Thanks!

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 https://playground.streamlitapp.com/?q=custom-bar-colors :upside_down_face:

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.