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.1.tar.gz (808.9 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.1-py3-none-any.whl (3.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: draggable-line-chart-0.2.1.tar.gz
  • Upload date:
  • Size: 808.9 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.1.tar.gz
Algorithm Hash digest
SHA256 ad63dfc466c2012699147a9944f9618657b65d5d3481728b70d01cec8f14754c
MD5 8943766232326d68cb06b44463317fbf
BLAKE2b-256 99f571d50f3f3e49669ecfbb3057a699105952f5af764d5bffe1cdf37a5828a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for draggable_line_chart-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 80f403c405e7b309bfc687f677fb1f24564b8d2f4d9db1cd55acb0a7f74c6736
MD5 6194e6fbf703fe7ed846b26dc97cac76
BLAKE2b-256 ea7c7daf4d01a128f1773bfd31c805adf73acda2d418fb380e2439d93cb6250b

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