Skip to main content

A Streamlit component that displays a line chart with draggable points. Users can click and drag points on the chart to adjust their values. The updated data of the chart is returned.

Project description

st-draggable-line-chart

Streamlit component that displays a line chart with draggable points. Users can click and drag points on the chart to adjust their values. The updated data of the chart is returned.

Installation instructions

pip install draggable-line-chart

Example

import pandas as pd
import streamlit as st

from draggable_line_chart import draggable_line_chart

st.header("Draggable Plot!")

initial_data = pd.DataFrame({
    "Col1": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
    "Col2": [1, 4, 9, 16, 25, 36, 49, 64, 81, 200],
    "Col3": [-1, -2, -3, -4, -5, -6, -7, -8, -50, -100]
})


plot_options = {
    "title": "My Plot",
    "colors": ['#1f77b4', '#ff7f0e', '#2ca02c'],
    "x_label": "X Axis",
    "y_label": "Y Axis",
    "x_grid": True,
    "y_grid": True,
}
new_data = draggable_line_chart(data=initial_data.to_dict(), options=plot_options)
new_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

draggable-line-chart-0.2.0.tar.gz (808.6 kB view details)

Uploaded Source

Built Distribution

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

draggable_line_chart-0.2.0-py3-none-any.whl (2.3 MB view details)

Uploaded Python 3

File details

Details for the file draggable-line-chart-0.2.0.tar.gz.

File metadata

  • Download URL: draggable-line-chart-0.2.0.tar.gz
  • Upload date:
  • Size: 808.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.5

File hashes

Hashes for draggable-line-chart-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e85644eb922484e26c86d9adbf4282414c05ac7b882ce7c4baf93eec258edef0
MD5 16d2a53e59fa8f0b90085224a7679ad3
BLAKE2b-256 d8eb95187f4b0820dd020651af726eb2190ebdde7ad3c5d5d4ddaae1fb859bea

See more details on using hashes here.

File details

Details for the file draggable_line_chart-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for draggable_line_chart-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 75e6ccb12b9c82b92b6af2f29118922888ce774abc6c5da2a3bf1b025b75acad
MD5 92ce26e4c45fa86f620fd9cfa538877d
BLAKE2b-256 013aafced5f523c00e656179dacec396e3425126726344be288b1d05fc29fc56

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