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 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 ![]()
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 ![]()
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.