Hi!
You can try
for shape in fig['data']:
shape['opacity'] = 0.5
after to show plot.
import plotly.figure_factory as ff
df = [dict(Task="Job A", Subtask="Subtask 1", Start='2020-02-01', Finish='2020-05-02'),
dict(Task="Job A", Subtask="Subtask 2", Start='2020-03-01', Finish='2020-07-02'),
dict(Task="Job A", Subtask="Subtask 3", Start='2020-04-01', Finish='2020-10-02'),
dict(Task="Job B", Subtask="Subtask 1", Start='2020-03-01', Finish='2020-06-02'),
dict(Task="Job B", Subtask="Subtask 2", Start='2020-05-01', Finish='2020-08-02'),
dict(Task="Job B", Subtask="Subtask 3", Start='2020-06-01', Finish='2020-09-02'),
dict(Task="Job C", Subtask="Subtask 1", Start='2020-01-01', Finish='2020-04-02'),
dict(Task="Job C", Subtask="Subtask 2", Start='2020-05-01', Finish='2020-08-02'),
dict(Task="Job C", Subtask="Subtask 3", Start='2020-06-01', Finish='2020-09-02')]
fig = ff.create_gantt(df, colors=['#333F44', '#93e4c1', '#FF4040'], index_col='Subtask',
show_colorbar=True, bar_width=0.2, showgrid_x=True, showgrid_y=True, group_tasks=True)
print(fig['data'])
for shape in fig['data']:
shape['opacity'] = 0.5
fig.show()
reference post