Skip to main content

A Streamlit custom component to display a timeline

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

streamlit-timeline-0.0.2.tar.gz (2.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page