When I do fig = px.timeline(df_bubble_bg, x_start="start", x_end="end", y="type", color='ID')
, I get a nice event sequence in one row, such as this:
However, when I tried subplot
traces = px.timeline(df_bubble_bg, x_start="start", x_end="end", y="participant", color='ID')
fig = make_subplots(rows=1, cols=1)
for trace in traces.data:
fig.add_trace(trace, row=1, col=1)
I would expect the same result, but instead, I got this result below:
However, if I remove the color='ID'
when creating the trace, I can get them to appear on the same row, but then they all have the same color, which is not desired.
What was missing, what should I adjust in order to get the exact same result without using the subplot. The reason Iām asking is because I have plan to add subplots to the figure, but like to keep that timeline form.