Missing functionality in `px.timeline` against `create_gantt()` figure factory
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 18.8k
- Fork
- 2.8k
- Merge trung bình
- 16 giờ 26 phút
- Pull request đã merge (30 ngày)
- 21
Mô tả
create_gantt() figure factory is deprecated in favor of px.timeline, but create_gantt() has the feature (argument) group_tasks that is not present with px.timeline.
An additional issue is that the group_task argument is not explained in the create_gantt() documentation check here.
For example, the code:
import plotly.express as px
import pandas as pd
df = pd.DataFrame([
dict(Task="Job A", Start='2009-01-01', Finish='2009-02-28', Resource='Alex'),
dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15', Resource='Max'),
dict(Task="Job C", Start='2009-02-20', Finish='2009-05-30', Resource='Max'),
dict(Task="Job A", Start='2009-03-02', Finish='2009-05-30', Resource='Alex')
])
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task", color = "Resource")
fig.update_yaxes(autorange="reversed") # otherwise tasks are listed from the bottom up
fig.show()
And I would like to have each tasks in the input data frame into its own line in the y-axis, even for repeating tasks:

We can obtain this using create_gantt() like:
from plotly.figure_factory import create_gantt
fig = create_gantt(df, index_col='Resource',
showgrid_x=True, showgrid_y=True,
show_colorbar=True,
group_tasks=False
)
fig.update_yaxes(autorange="reversed")
fig.show()
Obtaining:

The order follows the order in the df which I found a correct behavior, but an extra input to define the order in create_gantt() would be useful.
Hướng dẫn đóng góp
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.
Hướng nghiên cứu
Bắt đầu với điểm vào px.timeline và so sánh hành vi của nó với figure factory create_gantt(), đặc biệt là đối số group_tasks được minh họa trong các ví dụ. Kiểm tra tài liệu API của create_gantt() để tìm phần mô tả đối số còn thiếu. Hoàn thành khi các tác vụ lặp lại có thể được hiển thị trên các dòng trục y riêng biệt theo một thứ tự xác định và hành vi liên quan được ghi lại trong tài liệu.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- data-visualization
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100
