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",
}
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.1.0.tar.gz (808.5 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.1.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: draggable-line-chart-0.1.0.tar.gz
  • Upload date:
  • Size: 808.5 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.1.0.tar.gz
Algorithm Hash digest
SHA256 b4e8667fe108a0f7f3d470f7fddb1afb36e62cd1235401fdae89f2e4da6f4f90
MD5 5213c3db55a56114ac3861df6844592d
BLAKE2b-256 34df012af903b7d4386a1427d38912bebd66e47f02c032e4a2313481e0246905

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for draggable_line_chart-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c676e8dc7206616c770919ec86c21b0c7a7dde9b98b035ee86c9e04356dc93b
MD5 1b794acea16af12881c65e70caa18ef3
BLAKE2b-256 3d03eef7c72b209b0cd3bc76cd32fce759ed07cd97bdbbd74ef6264e7bb5e34b

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