Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Issue with plotly.express.timeline writing to an image with kaleido #5260

Open
Labels
P1needed for current cyclebugsomething broken
@shavnir

Description

@shavnir

I ran into a weird issue with plotly.express.timeline but it only shows up when you call fig.write_image, not in fig.show or fig.write_html. Basically every box in the chart gets left aligned and the x axis label starts at epoch.

Repro steps :
Ubuntu 20.04
Python - 3.10.12
PIPs installed in venv :

--------------- -----------choreographer   1.0.9kaleido         1.0.0logistro        1.1.0narwhals        1.45.0numpy           2.2.6orjson          3.10.18packaging       25.0pandas          2.3.0pip             22.0.2plotly          6.2.0python-dateutil 2.9.0.post0pytz            2025.2setuptools      59.6.0simplejson      3.20.1six             1.17.0tzdata          2025.2

Test code :

importpandasaspdimportdatetimeimportplotly.expressaspxdf=pd.DataFrame({"Task": ["A","B"],"Start": [datetime.datetime.fromtimestamp(1720000000),datetime.datetime.fromtimestamp(1720003600)],"Finish": [datetime.datetime.fromtimestamp(1720007200),datetime.datetime.fromtimestamp(1720010800)]})fig=px.timeline(df,x_start="Start",x_end="Finish",y="Task")fig.write_image("test.png")

The resulting test.png has two bars of equal length both left aligned starting at Jan 1 1970. If you put a fig.show() it shows the two bars offset as you would expect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1needed for current cyclebugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp