Skip to main content
# streamlit-advanced-plotly-chart
This is a streamlit custom component to preserve the zoom level of a plotly chart when getting event data from it. It also returns the range of the x-axis, which is useful for zooming in on a specific part of the chart and using a rangeslider.

It is based on the [streamlit-plotly-events](https://github.com/null-jones/streamlit-plotly-events/tree/master) component.


## Usage
```python
import streamlit as st
import plotly.express as px
import numpy as np

st.set_page_config(layout="wide")

st.subheader("Plotly Line Chart")

time = np.arange(0, 100, 0.1)
amplitude = np.sin(time)

fig = px.line(x=time, y=amplitude)

fig.update_xaxes(rangeslider_visible=True, range=[0, 10])

clickedPoint = preserveZoomPlotlyChart(fig, event='click')
```

When adding multiple lines to the chart and using a key, the plotly chart is stuck. Therefore, the key argument is not supported.

## Installation
```bash
pip install streamlit-advanced-plotly-chart
```



Metadata

Release files for streamlit-advanced-plotly-chart 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-advanced-plotly-chart 0.0.2
File Size Uploaded Provenance
streamlit-advanced-plotly-chart-0.0.2.tar.gz 1.7 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-advanced-plotly-chart 0.0.2
File Interpreter ABI Platform
streamlit_advanced_plotly_chart-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 3.4 MB

Release files / streamlit-advanced-plotly-chart-0.0.2.tar.gz

Download URL streamlit-advanced-plotly-chart-0.0.2.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
dfc2d0af7ac3e700d24ad03d882641fa20cc61f16c9ed4e04147e394ad324e0e
BLAKE2b-256 checksum
How to use checksums
5f1b37c6296f3c64e37bd7f54184f41967074ca53e5453e40a0a171a79b1aa44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.9

Release files / streamlit_advanced_plotly_chart-0.0.2-py3-none-any.whl

Download URL streamlit_advanced_plotly_chart-0.0.2-py3-none-any.whl
Size 1.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f67f97a18c0d8ff20351d3fae9d43aefb9ded6be8301959f390b2c989b9ee14e
BLAKE2b-256 checksum
How to use checksums
48861ee99b4c542a24f551dc733810a187b00cc61cb4916826d9e07f94c18622
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.10.9

Security for streamlit-advanced-plotly-chart 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page