St.line_chart axes


I’m trying to build a real-time application to monitor sensor data coming from the serial port. I’ve used the example found in the streamlit demo and have gotten it working now. Is it possible to change the horizontal axis so that the time is shown in hours instead of seconds? Is it also possible to change the scaling of the vertical axis somehow? Thank you.

Hi @jimi, welcome to the Streamlit community!

st.line_chart is a convenience function for quickly plotting, just so you can see if there’s any relationship (as you’ve found out). When you get to the point of needing lots of flexibility, st.line_chart is a wrapper around st.altair_chart, so anything you can do with the Altair library should be possible.