Open zbarry opened 4 years ago
Just as an initial guess I think the issue here might be that JS does not have sufficient integer precision to represent nanosecond datetimes so something is getting lost along the way.
Ah, I see. Is there some other dtype you think I should try instead to represent time series data based on timedelta
s?
If it is a precision issue in JS, then presumably this can can be reproduced with a pure Bokeh example?
Looking at this again I think this is just down to the fact that timedeltas aren't handled well.
A similar issue affects polars (unsurprisingly since it converts to pandas first, and the pandas dtype ends up being timedelta64[ns]
as well):
import polars as pl
df = pl.DataFrame(dict(a=list(range(10000)), b=list(range(10000))), schema=dict(a=pl.Duration('ns'), b=int))
df.plot.line('a', 'b')
So whoever takes on https://github.com/holoviz/holoviews/issues/5939 should ensure nanosecond works as well (and not rely on Python timedeltas: https://github.com/pola-rs/polars/issues/14695)
EDIT: updated the snippet to a more obvious example of truncation to microsecond.
ALL software version info
hvplot 0.6.0
Description of expected behavior and the observed behavior
It looks like tick formatting for time axes is not being applied for the first plot in a layout, only in subsequent ones: