FigureWidget doesn't properly display a DateTime x-axis labels

I’m using Jupyter Lab

I have a DateTime as the x-axis in a plot. If I use Figure() it renders the a-xais labels correctly. However, FigureWidget() renders as a very large integer. This issue also shows up in the hover box.
Does anyone else see this?

With Figure()


With FigureWidget()

import pandas as pd
import plotly.graph_objects as go
import ipywidgets as widgets

useFigureWidget=True

df = pd.DataFrame({'A': pd.Series(range(1,289)), 'B': pd.Series(range(289,1,-1))})
x = pd.date_range(start="20250303"+"000000", freq='5min', periods=288)

fig = go.FigureWidget() if useFigureWidget else go.Figure()

fig.update_layout(
    xaxis_title="hour", 
    hovermode="x unified",
    xaxis=dict(tickformat="%H")
)

for trace in df.columns:
    fig.add_trace(go.Scatter( 
        name=trace, 
        x=x, 
        y=df[trace],
        xhoverformat="%b %d %H:%M%", 
        hovertemplate="%{y:.f}",
   ))  

fig.show()`Preformatted text`

Just a fellow plotly user here :). After quite some fighting with this issue myself, downgrading to a version below 6.0 solved the problem for me. I have the same problem as above with the current 6.0.1 release, showing the unix timestamp instead of nicely formatted dates.

For example this version gives the expected behavior for the provided example code:

>>> plotly.__version__
'5.24.1'