Display a chart using the Altair library.
Function signature

st.altair_chart(altair_chart, use_container_width=False)


altair_chart (altair.vegalite.v2.api.Chart)

The Altair chart object to display.

use_container_width (bool)

If True, set the chart width to the column width. This takes precedence over Altair's native width value.

Was this page helpful?


Still have questions?

Our forums are full of helpful information and Streamlit experts.