How to increase the Gantt exporting performance with large dataset?
In Gantt, while exporting the larger timescale with task dependency support then pdf export will take more time for drawing of Gantt. But we can optimize the time delay and increase the performance with sample level by changing values of Gantt property in server side.
Please refer the below table for further details.
Property | Code Snippet | Usages |
[CS] public void PdfExport(string GanttModel, boolisFitToWidth) { PdfExport exp = new PdfExport(); GanttProperties obj = ConvertGanttObject(GanttModel); obj.ScheduleHeaderSettings.ScheduleHeaderType =GanttScheduleHeaderType.Year; //.. }
| By changing the scheduleHeaderType as “Year” we can reduce the Gantt schedule header timeline size in exported file. | |
EnableFooter | [CS] public void PdfExport(string GanttModel, boolisFitToWidth) { PdfExport exp = new PdfExport(); GanttPdfExportSettings settings = newGanttPdfExportSettings(); settings.EnableFooter = false; //.. } |
when settings “false” value to EnableFooter property then the footer will not be rendered in the Gantt exported file. Hence, we can reduce the page size. |
EnableHeaderInAllPages | [CS] public void PdfExport(string GanttModel, boolisFitToWidth) { PdfExport exp = new PdfExport(); GanttPdfExportSettings settings = newGanttPdfExportSettings(); settings.EnableHeaderInAllPages = false; //.. } | when settings “false” value toEnableHeaderInAllPagesproperty then the Gantt header will be rendered only for first page of the exported file. |
[CS] public void PdfExport(string GanttModel, boolisFitToWidth) { PdfExport exp = new PdfExport(); obj.ScheduleHeaderSettings.TimescaleStartDateMode = GanttTimescaleRoundMode.Month; //.. } | This property is used to specifies the round-off mode for the start date in schedule header. We have provided theScheduleHeaderType value as “Year, so we have set the TimescaleStartDateMode property value as “Month” |