Skip to main content

Streamlit component that allows to create custom card content for streamlit dashboard

Project description

streamlit-slb-card

Streamlit component that allows to create custom card content for streamlit dashboard

Installation instructions

pip install streamlit-slb-card

Release Notes

1.0.8

  • Fix the card min height

Usage instructions

import streamlit as st

from streamlit_slb_card import streamlit_slb_card

# sample data

# LineChart
data = {
    "xAxis": ["Nov 1", "Nov 2", "Nov 3", "Nov 4", "Nov 5", "Nov 6"],
    "value": [2, 5.5, 2, 8.5, 1.5, 1],
    "color": "maroon"
}

# PieChart
# data = [
#         { "id": 0, "value": 10, "label": 'Helmet Violation', "color": 'green' },
#         { "id": 1, "value": 32, "label": 'Coverall Violation', "color": 'red' },
#         { "id": 2, "value": 45, "label": 'Glove Violation', "color": 'blue' },
#         { "id": 3, "value": 28, "label": 'Vest Violation', "color": 'orange' }
#     ]

# BarChart
# data = {
#         "name": ["Total Wells", "Total Active", "Total Down"],
#         "value": [45, 30, 15],
#         "color": "green"
#     }

streamlit_slb_card(
    title="Crew Health", 
    titleTextAlign="left",
    titleTextSize="25",
    headerContent=f"<div><div style='font-size:14px;font-weight: bold'>Average Pulse Rate</div><div><span style='font-size:40px'>10</span> beats/min</div></div>",
    showChart=True,    
    chartType="LineChart", # Supported charts -> PieChart, BarChart, LineChart
    chartTitle= "Violation Types",
    chartData=data
)

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-slb-card-1.0.8.tar.gz (909.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

streamlit_slb_card-1.0.8-py3-none-any.whl (917.0 kB view details)

Uploaded Python 3

File details

Details for the file streamlit-slb-card-1.0.8.tar.gz.

File metadata

  • Download URL: streamlit-slb-card-1.0.8.tar.gz
  • Upload date:
  • Size: 909.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for streamlit-slb-card-1.0.8.tar.gz
Algorithm Hash digest
SHA256 7534b99078cfe6a8fedc1b63a59a9d1e8064e39c54f8bd3b5b0100f25e37a71f
MD5 cc06718fca6b4d5c10d9fb3dc04a0101
BLAKE2b-256 1dfbe679a6dbeb22b63bf7962c435037f41b0741867d1beb0ff8b57a637464ab

See more details on using hashes here.

File details

Details for the file streamlit_slb_card-1.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_slb_card-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8b4f384f7e59926aac58a359165353753f9df9a9e96b87ff79d07631f086e2e5
MD5 ac48143751a88daaec6ad80898c1c4b4
BLAKE2b-256 13182d7de48083c7b66541a8dbc5432025f95e5a9b72bfe7e3596ae766df5e5c

See more details on using hashes here.

Supported by

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