plotly-resampler
plotly-resampler copied to clipboard
fix: check if update_data contains update before batch_update
When using FigureWidgetResampler
using traces that are not resampled (e.g., Histogram, Bar, etc.), the following action chain resulted in a TypeError
(because update_data
is NoUpdate)
- Zoom in in a region
- Reset the axis (house icon)
Reproducible code:
import numpy as np
from plotly_resampler import FigureWidgetResampler
x = np.random.randn(100)
fig = FigureWidgetResampler(go.Figure(go.Histogram(x=x)))
fig
Error :arrow_down: