How to define upper and lower bound of y-axis in st.line_chart function?
my python script is here.
Hi @kaizhang, welcome to the Streamlit community!
st.line_chart
is a convenience wrapper around st.altair_chart
, so that you can quickly get something created. If you need more customization options, you should use st.altair_chart
or another visualization library to customize your chart:
st.altair_chart
docs: API reference — Streamlit 0.75.0 documentation
Altair docs: https://altair-viz.github.io/
Best,
Randy
@kaizhang : Here is the specific documentation on how to set axis limits in Altair.
Once you jump from st.line_chart
to st.altair_chart
you find an incredible wealth of customization options. Altair is truly an amazing visualization library (it’s a front-end for D3) and it’s capable of creating stunningly beautiful charts!
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.