It is possible to define the sort order of grouped tasks on the gantt chart?
Every time I reload the chart with new data it seems to randomly choose an order to list the groups down the y axisâŚ
fig = ff.create_gantt(df, colors=colors, index_col='Resource', bar_width=.5,
show_colorbar=False, showgrid_x=False, showgrid_y=False, group_tasks=True)
Couldnât find anything in documentation, would have to think there is a way to do this thoughâŚ
The order is by colour. E.g. I am using the following for something and it orders from A to F.
colors = dict(A = ârgb( 0, 0, 0)â,
B = ârgb( 0, 0, 150)â,
C = ârgb( 0, 0, 250)â,
D = ârgb( 0, 100, 250)â,
E = ârgb( 0, 200, 0)â,
F = ârgb(250, 0, 0)â)
Unfortunately this doesât seem to always be true:
colors = {4: white, 2: light_blue, 1: dark_blue, 3: teal}
fig = ff.create_gantt(df, colors=colors, index_col='Resource', bar_width=.5,
show_colorbar=False, showgrid_x=False, showgrid_y=False, group_tasks=True)
The same code sometimes when fed different data returns both of these variations