Skip to content

A simple Streamlit Component to display a Timeline in Streamlit apps. It integrates Knightlab's TimelineJS.

License

Notifications You must be signed in to change notification settings

innerdoc/streamlit-timeline

Repository files navigation

repo logo

Timeline Component for Streamlit

A simple component to display a timeline in Streamlit apps. It integrates Knightlab's TimelineJS.

Installation

First install Streamlit (of course!) then pip-install this library:

pip install streamlit
pip install streamlit-timeline

Example

# Streamlit Timeline Component Example

import streamlit as st
from streamlit_timeline import timeline


# use full page width
st.set_page_config(page_title="Timeline Example", layout="wide")

# load data
with open('example.json', "r") as f:
    data = f.read()

# render timeline
timeline(data, height=800)

Parameters

The timeline() function accepts a string or a dict, as long as it's in the TimelineJS json format. The optional heigth of the visualization is in px.

Preview

You can also check the preview video or go to the demo A History of Natural Language Processing.

timeline example

About

A simple Streamlit Component to display a Timeline in Streamlit apps. It integrates Knightlab's TimelineJS.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages