Gantt chart export with kaleido v1.0.0 shows 1970 epoch
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Lĩnh vực
- data-visualization
Hướng nghiên cứu
Bắt đầu bằng cách chạy ví dụ Python tối thiểu với pandas 2.3.1, plotly 6.3.0 và kaleido 1.0.0, sau đó so sánh hình ảnh đã xuất với môi trường kaleido 0.2.1 cũ hơn. Theo dõi đường dẫn xuất tĩnh cho các giá trị ngày của trục thời gian; hoàn thành khi Gantt_Chart.png giữ nguyên các ngày tháng 8 và tháng 9 năm 2025 trên trục x.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem Description
I'm reporting a bug with the new kaleido v1.0.0 engine, when I make a Gantt chart with plotly.express.timeline. The issue is how it handles my datetime objects (and with sting date) when I try to save a static image.
I found the problem in a couple of ways:
- When I run
fig.show()in my Jupyter Notebook, the chart looks perfect with the right 2025 dates. But when I save that same figure withfig.write_image(), I get a broken image. Its x-axis starts at 1970. - I get the exact same broken image with 1970 dates when I run my code as a normal Python script.
It really makes me think this is a regression bug in the kaleido v1.0.0 renderer.
Minimal Reproducible Example
This script will always create the error. The /// script part is there for anyone using a tool like Astral's uv.
# /// script
# requires-python = "==3.13.1"
# dependencies = [
# "pandas==2.3.1",
# "plotly==6.3.0",
# "kaleido==1.0.0",
# ]
# ///
import pandas as pd
import plotly.express as px
data: list[dict] = [
dict(Start="2025-08-16", Finish="2025-08-30", Task="Data Collection"),
dict(Start="2025-08-25", Finish="2025-09-15", Task="Identifying Problem"),
dict(Start="2025-09-13", Finish="2025-09-30", Task="Review & Submission"),
]
df: pd.DataFrame = pd.DataFrame(data)
df.Start = pd.to_datetime(df.Start)
df.Finish = pd.to_datetime(df.Finish)
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task", color="Task")
fig.update_layout(template="presentation")
fig.update_layout(autosize=False, width=1000, height=300, margin=dict(l=270, r=10))
fig.update_layout(
showlegend=False,
title="Gantt Chart",
bargap=0.45,
)
# This makes the wrong image
fig.write_image("Gantt_Chart.png")
Expected Behavior
I expected my saved file Gantt_Chart.png to show a chart with an x-axis properly showing dates in August and September 2025.
Actual Behavior
What I actually got in Gantt_Chart.png was a chart where the x-axis starts near January 5, 1970.
Working Environment Confirmation
I ran a control test to be sure. I tested my same code in an environment with older libraries:
plotly==6.0.0kaleido==0.2.1
In that setup, the bug is gone. My list of confirmations show that the static image Gantt_Chart.png saves perfect with the right 2025 dates.
This points me to think the problem is a regression in the newer code.
Failing Environment
- Python:
3.13.1 - pandas:
2.3.1 - plotly:
6.3.0 - kaleido:
1.0.0
- Ngôn ngữ chính
- Python
- Star
- 504
- Fork
- 65
- Merge trung bình
- 6 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của plotly/kaleido
-
Writing to an existing directory whose name has a dot fails with "Invalid format"Có thể đã có người làm @RaphaelFakhri đã nhận 13 ngày trước. Đang mởbug P3 size: 1
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
-
Deterministic Rendering ChallengesCó thể làm lại được @camdecoster đã nhận 68 ngày trước và không có pull request nào đang mở. Đang mởenhancement feature P2 size: 5
-
[FEATURE]: Embed custom fonts into vector exports (no system install)Có thể đã có người làm @camdecoster đã nhận 125 ngày trước. Đang mởenhancement P3 size: 3
-
enhancement feature P3 size: 5
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
GlobalKaleidoServer is not thread-safeCó thể đã có người làm @talleibman đã nhận 250 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Tất cả issue của plotly/kaleido
Issue tương tự
-
flow-measurement measurement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
MichaelYcJo/SpecSeal#1366 ·
-
bug c/evals c/ui size:L
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Arize-ai/phoenix#17633 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
TransformerLensOrg/TransformerLens#1980 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Module: Solr Needs: Lead Needs: Triage Theme: Search Type: Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
internetarchive/openlibrary#14284 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 69/100
SpaceCowMedia/commander-spellbook-backend#1292 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày