Black Lives Matter. Please consider donating to Black Girls Code today.

Grantt Chart Append

Hey guys, I’m new to plotly

I’m trying to create Grantt chart using python where I’m generating data every 1 min and I like to append data to Grannt chart. so here is the part of code im trying and loop is executing every 60 sec

trace2 = dict(Task=“Motor Status”, Start=timeMinus60, Finish=timenow)
trace1 = dict(Task=“Tank Status”, Start=timeMinus60, Finish=timenow)
trace0 = dict(Task=“Water In”, Start=timenow, Finish=timenow) #Start=timenow so that nothing comes up on chart

df = [trace0, trace1, trace2]
fig = ff.create_gantt(df)
py.plot(fig, filename=‘Water Tank Status’,fileopt=‘extend’)

But I am not getting expected result with it. Any help would be appreciated.

Hi @robov,

The figure_factor functions aren’t really designed to support incrementally adding data to an existing figure. So I would recommend you look at constructing your plot using one or more horizonal Bar traces (

Also, how are you wanting to display the plots? If you use FigureWidget class to display it in the notebook then you could iteratively update the bar coordinates as more data arrives.


1 Like

Thank You, That sounds like good option.

As of now I’m using free account, may I know

How many events I can add to the plot per day.
How much history I can view.

Is there any limit on that?

If you use FigureWidget everything is offline and there is no direct interaction with So there are no limits :slightly_smiling_face:

Hope that helps!