Home > Software engineering >  How can I label x and y of a line_chart
How can I label x and y of a line_chart

Time:07-28

I have a line_chart below, plotted with st.line_chart(), how can I label x and y? I tried with matplotlib but I couldn't achieve my expected output.

import streamlit as st

st.line_chart(df)

enter image description here

My expected output: enter image description here

CodePudding user response:

Well, st.altair_chart can help you achieve that expected result but if your df is complex, you will have to put in a lot of work, that depends on how worthy your expected output is. Refer to this altair_chart doc in the streamlit platform, where you can find different illustrations and how to handle them.

  • Related