plotly-resampler icon indicating copy to clipboard operation
plotly-resampler copied to clipboard

fix: check if update_data contains update before batch_update

Open jvdd opened this issue 5 months ago • 1 comments

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)

  1. Zoom in in a region
  2. 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: image

jvdd avatar Aug 25 '24 12:08 jvdd