Custom Export with larger datasets

Hello,
I am trying to export custom gantt which has multiple bars added using addLayer() in timeline view, custom icons in treegrid view and huge dataset(35000 records).
When I try to export it to PDF, it gives 20 seconds timeout message. How can I perform export to PDF and PNG using the component?

Please provide some sample.

Hello Surbhi,
If you export large charts by using our online export server, this is expected behavior as it is one of the limitations:
https://docs.dhtmlx.com/gantt/desktop__export.html#onlineexportservicerestrictions

To export large charts, you need to use the standalone export module.

Hi Ramil,
Thank you for the update. Will it be possible for you to provide some sample with 30K custom records which can be exported? It will help us in planning the purchase of the component.

Thanks,
Surbhi

Hello Surbhi,
Here are a few exported files:
https://files.dhtmlx.com/30d/0fffee7d8fe34d5d72761aaa4075ebe7/gantt_30000_tasks_82years.pdf

https://files.dhtmlx.com/30d/414d7f3ca4fa5c390fbece2f7d7e04cd/gantt_30000_tasks_and_links_15_years.pdf

https://files.dhtmlx.com/30d/b5d2fa3f00d00473ff9f0b2f0b04fd7a/gantt_30000_tasks_and_links_82years.pdf

I used these snippets to export the data:
https://snippet.dhtmlx.com/cgrkpyps

https://snippet.dhtmlx.com/1xzrp44w

https://snippet.dhtmlx.com/80z8ruwg

Most of the time it takes 10-15 minutes to export the data and requires 3-4.5 RAM.
Unfortunately, in the latest version of the export module (0.7.0), Electron has a limitation of maximal RAM it can use (4.4Gb). This limitation is not set by the our developers, so, there is no way to remove it.
However, it is possible to use the older version of the export module (0.6.7) where Electron doesn’t have that limitation. So, it is possible to export huge charts. This is where I exported the files. Here is one more example:
https://files.dhtmlx.com/30d/1a85cde18a67b564d7fa1978935cd3f5/50K_tasks,137_years.pdf

If you need to export large charts, we will provide the support for that.


It doesn’t work the same way with the PNG export. Saving even small portions of Gantt to a PNG file requires a lot of RAM. For example, if there are only 1000 tasks within 1 year, the sizes can be 26250 x 36000 which is 945 Megapixels!
So, exporting large charts to a PNG file is not recommended.
The maximal sizes of the exported file are limited by 10000х10000 pixels. You can increase one of the sizes, and decrease another one correspondingly. But if the product of the values of the width and height is greater than 100000000 (10000х10000), the output PNG image will be cropped off.

It is possible to export the chart by pieces. But it will take a lot of time. Even a chart with 2000 tasks within 5 years takes 20 minutes to export. Larger charts will need enormous amounts of time (in theory, it should be from several hours to several weeks, but I didn’t check that).
I used this snippet to try the export:
https://snippet.dhtmlx.com/lg0uirvg

And this is what I got:
https://files.dhtmlx.com/30d/fd364146bf36d46a6eea5042e5a39d0a/gantt_2000_tasks_5_years.zip


Anyway, you can share a snippet with the Gantt configuration and a test dataset. I will export the data from it and share with you. This way you will be able to see how it works with your data and configuration not with the abstract number of tasks and years.

1 Like

Thank you Ramil for explaining things.