I check back every few months to see if Gantt GL has been implemented, but it has been over a year now, so I thought I’d request it here.
Gantt charts are amazing for one of our use cases, but rendering them with more than 25K lines becomes cumbersome. It would be truly incredible to have the speed and performance demonstrated by ScatterGL with Gantt charts… so if some developer out there is listening, this would be awesome if you could implement this!!
Hi @rlele5, welcome to the forum! You can actually convert quite easily a figure created with the gant figure factory to scatter gl. For example
import plotly.figure_factory as ff
df = [dict(Task="Job A", Start='2009-01-01', Finish='2009-02-28'),
dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15'),
dict(Task="Job C", Start='2009-02-20', Finish='2009-05-30')]
fig = ff.create_gantt(df)
import plotly.graph_objects as go
fig2 = fig.to_dict()
for trace in fig2['data']:
trace['type'] = 'scattergl'
fig2 = go.Figure(fig2)
fig2.show()
That said, I’m not sure whether you will see a performance gain because you will still have the same number of traces. I’m curious to know more about your application, 25k lines sounds like a lot of tasks :-).
Ah, thanks for the sample code. I was under the assumption that ScatterGL is faster because it uses the graphics card to render plots? I saw on the example page that it renders 1 million points in less than a couple seconds. Why couldn’t a GanttGL benefit from this performance improvement as well?
My use case is to track task executions on server threads. Task times can range anywhere from 1 ms to many minutes. For a moderate time range (a couple hours), you could have hundreds of thousands of tasks. We obviously don’t look at all hundreds of thousands, but when all are plotted, it’s easy to visualize small time ranges (< 10 min) with a high density of tasks and zoom in to problem regions. Then once we’re in the zoomed in mode, seeing the timeline makes seeing task dependencies really easy and can quickly point us in the right direction when debugging issues (esp with informative tooltips).
So the ask is to be able to quickly plot up to a couple hundred thousand tasks over a couple hours, and to be able to quickly zoom into the problem region (< 10 min) to be able to scrutinize those tasks. As of now, we filter beforehand to keep the task counts in a single chart to < 25K, but since I saw that incredible performance with ScatterGL (1 million points), I was wondering if it could be applied to the Gantt chart as well!
I tried the example you gave me on my data… and it almost works. The underlying code (processing the tasks + creating tooltips, etc) still takes the same time, but when the chart is finally plotted I do see the performance benefits when zooming and looking at tooltips! However, the plot gets messed up.
The zooming in the Gantt GL code you provided is almost instantaneous for 25000 tasks vs 6 seconds for the original, but as you can see, the rendering gets messed up. Seems like it’s almost there. Would be amazing if it could become a reality!
I could indeed reproduce the problem on one of the documentation examples. Scatter and scattergl don’t behave in the same way for the following example (which uses how the Gantt rectangle are built, with None values)