RangeLinePlot
RangeLinePlot is a Dash component library.
RangeLinePlot integrates with Plotly.js to create interactive line plots with a draggable range selector. The component allows users to highlight a selected range on the x- or y-axis and dynamically adjust it through drag-and-drop functionality.
Features
- Interactive Range Selection: Highlight a range on the x- or y-axis and adjust it interactively.
- Customizable Styles: Modify line, boundary, and gray zone styles to match your design.
- Dash Integration: Fully compatible with Python Dash applications.
Installation
Install the component from PyPI using pip:
pip install dash-rangelineplot
Usage
from dash import Dash, html
from rangelineplot import Rangelineplot
app = Dash(__name__)
app.layout = html.Div([
Rangelineplot(
id="example-plot",
data={
"x": list(range(10)),
"y": [x ** 2 for x in range(10)],
},
range=[2, 6], # Initial range
axisType="x", # Range applies to x-axis
)
])
if __name__ == "__main__":
app.run_server(debug=True)
Props
| Prop | Type | Default Value | Description |
|---|---|---|---|
id |
string |
None |
Unique identifier for the component. |
data |
dict |
{"x": [], "y": []} |
Input data as two arrays: x and y. Must have equal lengths. |
range |
list[number] |
None |
Initial range [start, end] for the selected axis. |
axisType |
string |
'x' |
Specifies the axis for the range ('x' or 'y'). |
lineStyle |
dict |
{color: '#1f77b4', width: 2} |
Plotly line style for the main data trace. |
grayZoneStyle |
dict |
{fillcolor: 'rgba(200,200,200,0.5)'} |
Fill style for gray zones outside the selected range. |
boundaryStyle |
dict |
{color: 'transparent', width: 20} |
Line style for the draggable boundary lines. |
Development
Install Dependencies
If you’re contributing to the development of this component, install the necessary dependencies:
npm install
pip install -r requirements.txt
Build the Component
After making changes to the React component, rebuild the bundle:
npm run build
python usage.py
The resulting files will be placed in the rangelineplot/ directory for use in the Python wrapper.
License
This project is licensed under the MIT License.
Metadata
Release files for dash-rangelineplot 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dash_rangelineplot-0.0.4.tar.gz | 6.0 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dash_rangelineplot-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 MB
Release files / dash_rangelineplot-0.0.4.tar.gz
| Download URL | dash_rangelineplot-0.0.4.tar.gz |
|---|---|
| Size | 6.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
49e06153bada078561f22ff74e50517fe197ee25506ce6816f259989dc088513
|
|
BLAKE2b-256 checksum How to use checksums |
2659954f4db23f6dce318273ac628ef2dc18bbe57ec8be593c797d0075836268
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / dash_rangelineplot-0.0.4-py3-none-any.whl
| Download URL | dash_rangelineplot-0.0.4-py3-none-any.whl |
|---|---|
| Size | 6.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee316cffbcc05cd6e78bfd333759cf35df23a12d1065004dc781176fb5cdf9be
|
|
BLAKE2b-256 checksum How to use checksums |
73416dfd0f970e5e576da428980f174f5e8d2d0bc250250094ede788402a868e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for dash-rangelineplot 0.0.4
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.