St.bar_chart argument "stack" not recognized

The demo code for st.bar_chart from the streamlit docs is not working. It is not recognizing the “stack” argument.

This code:

import streamlit as st
from vega_datasets import data

source = data.barley()
st.bar_chart(source, x="year", y="yield", color="site", stack=False)

Throws error:
TypeError: ArrowAltairMixin.bar_chart() got an unexpected keyword argument 'stack'

I am running it locally with these package versions:

python: 3.12
streamlit: 1.29.0
altair: 5.3.0

You are looking at the docs for streamlit 1.37.

1 Like

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