Plotly-resampler is a Python library designed for visualizing large time series datasets efficiently with Plotly. It extends Plotly's capabilities by dynamically resampling data based on the zoom level, ensuring smooth performance even with millions of data points. The current version is 0.11.0, and the project maintains an active development pace with frequent releases.
pip install plotly-resamplerVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a `FigureResampler` instance to visualize a large time series dataset. It wraps a standard `plotly.graph_objects.Figure` and uses the `add_trace` method with `hf_x` and `hf_y` arguments to enable dynamic resampling.
Remove `check_nans` from your calls. Configure NaN handling via the `nan_policy` argument of your chosen aggregator (e.g., `MinMax(nan_policy='drop')`).
Ensure `tsdownsample` is installed. Review custom aggregation logic if you were relying on internal details of previous backends. Most users will benefit from improved performance and reduced compilation issues.
Decide whether to explicitly instantiate `FigureResampler` or use `FigureResampler.register_plotly_resampler()` at the start of your script/application for global effect. Be aware that global registration affects all `go.Figure` objects.
To get these dependencies, use `pip install plotly-resampler[full]` or `pip install 'plotly-resampler[kaleido]'` / `pip install 'plotly-resampler[flask-dash]'` as needed.