Skip to content

plotly 6.1.2 not showing datetime for FigureWidget #5210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mgmarino opened this issue May 30, 2025 · 0 comments
Open

plotly 6.1.2 not showing datetime for FigureWidget #5210

mgmarino opened this issue May 30, 2025 · 0 comments

Comments

@mgmarino
Copy link

mgmarino commented May 30, 2025

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.

@mgmarino mgmarino changed the title plotly 6.1.1 not showing datetime for FigureWidget plotly 6.1.2 not showing datetime for FigureWidget May 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant