Data from SQLite3 to a chart

how to read data on a graph after retrieving data from the database (SQLite3)

currently I get a list of data like this

and I would like to put them on a graph

Thank you for reading, and Happy Streamlit-ing! :balloon:

Hi @Simon_Elsen ,
Thanks for posting and welcome to the Streamlit community! :slight_smile:
can you explain to me what is not working? I would expect st.bar_chart(…) to work. You could also use st.plotly_chart or st.altair_chart.


It looks like perhaps you need to add a line return rows to your select_all_tasks, since right now it’s just printing the rows, not actually returning them.


indeed I had forgotten that, thank you

However I still don’t have the solution, it seems to come from the packages but I have my requirements.txt which is in the github repo in the same root as the main page so I don’t understand the problem

here are the errors in the streamlit console

my dateRecorded and prod are elements read from the sqlite db, then I implement them in the bar_char() via the x= and y= can I do this? it doesn’t seem to be recognized

Hi @Simon_Elsen, the next step I would recommend is using st.write(graph3_data) to see what columns are actually in that dataframe.