Skip to content

plotly 6.1.2 not showing datetime for FigureWidget #5210

Open
@mgmarino

Description

@mgmarino

The FigureWidget seems to be broken in plotly 6.0 when showing datetime types.

Reproduced using the example here

import plotly.graph_objects as go

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv').assign(Date=lambda x: pd.to_datetime(x.Date))

fig = go.Figure([go.Scatter(x=df['Date'], y=df['AAPL.High'])])
fig.show()

displays correctly with datetime:

Image

With FigureWidget:

import plotly.graph_objects as go

import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv').assign(Date=lambda x: pd.to_datetime(x.Date))

fig = go.FigureWidget([go.Scatter(x=df['Date'], y=df['AAPL.High'])])
fig.show()

shows the nanosecond ints:

Image

This was run in VSCode (1.100.2) and also jupyterlab/server (lab == 4.4.3, jupyter-server == 2.16.0)

Seems similar to #5101.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2considered for next cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions