Is there a way to separate tasks on a Gantt diagram if they have the same names?
import plotly.express as px
import pandas as pd
df = pd.DataFrame([
dict(Task="Job A", Start='2009-01-01', Finish='2009-02-28', Worker='Alex'),
dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15', Worker='John'),
dict(Task="Job A", Start='2009-02-20', Finish='2009-05-30', Worker='Marc')
])
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task", color="Worker")
fig.update_yaxes(autorange="reversed")
fig.show()
I want to show two jobs named "Job A" as separate tasks, not grouping and not in one line using opacity, and preferably not using deprecated plotly.figure_factory.create_gantt
. Thanks in advance!
y
and it would put it in separate line. It would need only to change labels on Y-axis toTasks
. You could also tryy=df.index
create_gantt()
which could use optiongroup_tasks=False
, See: Gantt