Hi Remi,
At Present there is no support to Print or exporting the Gantt chart. So we have already logged a feature report regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Please let us know if you require further assistance on this.
Regards,
Mahalakshmi K.
$("#GanttContainer").ejGantt({
toolbarSettings: {
showToolbar: true,
toolbarItems: [
ej.Gantt.ToolbarItems.ExcelExport,
]
},
toolbarClick: toolbarclick
});
function toolbarclick(args) {
var id = $(args.currentTarget).attr("id");
this.exportGrid = this["export"];
if (id == "GanttContainer_excelExport") { this.exportGrid('http://js.syncfusion.com/demos/ejServices/api/Gantt/ExcelExport', "", false);
args.cancel = true;
}
} |
function updateGanttSize() {
var ganttObj = $("#GanttContainer").ejGantt("instance"),
toolbarHeight = $("#GanttContainer_toolbarItems").outerHeight(),
model = ganttObj.model, width, totalLen = 0,
treeObj = ganttObj._$treegridHelper.ejTreeGrid("instance");
var treeWidth = $("#ejTreeGrid" + ganttObj._id + "e-table").outerWidth() + 1,
chartWidth = $("#ganttviewerbodyContentejGanttChart" + ganttObj._id).outerWidth() + 2;
totalLen = treeObj.getExpandedRecords(model.updatedRecords);
//To calculate the height of Gantt as per records count
var height = model.rowHeight * totalLen.length + treeObj.getHeaderContent().height() + toolbarHeight + 2,
width = treeWidth + chartWidth + 9;
//Resizing Gantt and update splitter bar position
var sizesettings = { height: height.toString(), width: width.toString() },
splitterSettings = { position: treeWidth.toString() };
ganttObj.setModel({ "sizeSettings": sizesettings, "splitterSettings":splitterSettings });
} |