Huge thanks for this wonderful component, Qiusheng!
Would you have an idea how I could accomplish multiselection in my code? I checked the documentation and passed " ‘mulitselect’: True" into the options but it does not work.
I am a beginner in python. So, I am not sure how do I get my dataframe into a format that is suited for this library. So, far I have done following but it is not working. I am getting error of “string indices must be integers”. My dataframe name is item3 here (a subset of my main dataframe filtereddata with columns of project name, start date, end date and some other columns. It doesn’t have an ID column, so I have inserted it manually.
import streamlit as st
from streamlit_timeline import st_timeline
filtered_data.insert(0,'New_ID', range(880, 880 + len(filtered_data)))
items3= filtered_data[['New_ID','start_date','end_date']]
items3 = filtered_data.to_json()
items = [{'id':items3['New_ID'],'content':items3['end_date'],'start':items3["start_date"]}]
timeline = st_timeline(items, groups=[], options={}, height="300px")
st.subheader("Selected item")
st.write(timeline)
Could someone please help me change the style of the line and the dot?
My only success is to change the box’s style without changing the line and the dot.
Amazing component! Loved it!
I am planning to use it to schedule the production at my ice cream factory. So far I was able to to display the data, it has worked perfectly. But I was not able to store the new “start” data after rearranged, as the component returns the initial value of the item. Does anyone have a work around for this? Here is my code:
With “start” and “end” you can configure the start and endpoint of the axis once the timeline is loaded for the first time. When setting these options the timeline does not load at all. The code needs to be rerun to display the timeline.