Will give that the datetime64 array requires a linear axis. As such, the xaxis.range[0] and xaxis.range[1] arguments will not be parsed to timestamps, and the hf_x slicing (i.e. the bisect), will fail, resulting in this error:
Solution
extend the check with:
axis_type = (
"date"
if isinstance(dc.x, pd.DatetimeIndex) or
pd.core.dtypes.common.is_datetime64_any_dtype(dc.x)
else "linear"
)
TODO:
[x] verify if this occurs and works for pandas <2 Indeed this, occurs aswell for pandas<2
2.0.1
0.9.0rc1
code snippet which fails
What causes the fail:
this line: https://github.com/predict-idlab/plotly-resampler/blob/e56cbc71d32991c68e5763d3652394aff83cf94a/plotly_resampler/figure_resampler/figure_resampler_interface.py#L787
Will give that the
datetime64
array requires a linear axis. As such, thexaxis.range[0]
andxaxis.range[1]
arguments will not be parsed to timestamps, and the hf_x slicing (i.e. the bisect), will fail, resulting in this error:Solution
extend the check with:
TODO:
Indeed this, occurs aswell for pandas<2