Resource Gantt chart

Hello community team,

I’m trying to produce a Gantt chart for scheduling problem. In my model, I have some stages which contain one or more machines. I would like to get a result like this:

I’m using to create a Gantt chart and it can show tasks in different rows but, I want to show a specific task in the single row with different stages.

Any help is appreciated.


I’m not sure if I understood the question fully or not, but would it be by using the resource parameter as your stages.

As outlined in the multiple resource plotly help page:

import plotly.figure_factory as ff

df = [dict(Task="Job-1", Start='2017-01-01', Finish='2017-02-02', Resource='Stage0'),
      dict(Task="Job-1", Start='2017-02-15', Finish='2017-03-15', Resource='Stage1'),
      dict(Task="Job-2", Start='2017-01-17', Finish='2017-02-17', Resource='Not Started'),
      dict(Task="Job-2", Start='2017-01-17', Finish='2017-02-17', Resource='Complete'),
      dict(Task="Job-3", Start='2017-03-10', Finish='2017-03-20', Resource='Not Started'),
      dict(Task="Job-3", Start='2017-04-01', Finish='2017-04-20', Resource='Not Started'),
      dict(Task="Job-3", Start='2017-05-18', Finish='2017-06-18', Resource='Not Started'),
      dict(Task="Job-4", Start='2017-01-14', Finish='2017-03-14', Resource='Complete')]

colors = {'Not Started': 'rgb(220, 0, 0)',
          'Incomplete': (1, 0.9, 0.16),
          'Complete': 'rgb(0, 255, 100)'}

fig = ff.create_gantt(df, colors=colors, index_col='Resource', show_colorbar=True,

Dear Scrawford,

Thanks so much for the useful comment.
Would you please, say is there any way to index more than one column in the code? And how can I show only time (hh:mm:ss) in the horizontal axis? (when I removed the date string, it has an error).

Best Regards