Gantt Chart Expand/Collapse

I am getting error when i click on Expand/Collapse button in toolbar
Pls find the JSON attachment
this.dayWorkingTime=[
{
from:0,
to:23
}
];





this.taskSettings={
id:'TaskID',
name:'TaskName',
startDate:'StartDate',
duration:'Duration',
progress:'Progress',
endDate:'EndDate',
dependency:'Predecessor',
child:'Children',
manual:'isManual'
};
this.columns=[
{field:'TaskID',visible:false},
{field:'TaskName',headerText:'TaskName'},
{field:'StartDate',headerText:'StartDate'},
{field:'EndDate',headerText:'EndDate'}
];
this.editSettings={
allowAdding:false,
allowEditing:false,
allowDeleting:false,
allowTaskbarEditing:false,
showDeleteConfirmDialog:false
};
this.toolbar=['ExpandAll','CollapseAll','PdfExport','ExcelExport','CsvExport','ZoomToFit','ZoomIn','ZoomOut'];//'Add','Edit','Update','Delete','Cancel',
this.splitterSettings={
position:"25%"
}
this.labelSettings={
leftLabel:'TaskName'
};
this.timelineSettings={
timelineViewMode:'Month',
timelineUnitSize:100,
};
<ejs-gantt#gantt1id="gantt1"height="100%"[dataSource]="ganttData"[taskFields]="taskSettings"
readOnly=true[columns]="columns"[treeColumnIndex]="1"[dayWorkingTime]="dayWorkingTime"
[splitterSettings]="splitterSettings"[timelineSettings]="timelineSettings"
[labelSettings]="labelSettings"[editSettings]="editSettings"[allowSelection]="true"
[includeWeekend]="true"
[highlightWeekends]="true"allowPdfExport='true'allowExcelExport='true'[toolbar]="toolbar"(toolbarClick)="toolbarClick($event)"taskMode="Custom"[enablePredecessorValidation]="false">
ejs-gantt>


Attachment: GanttData_1415ab96.zip

5 Replies 1 reply marked as answer

VI vin replied to vin June 15, 2021 02:23 PM UTC

I am getting error when i click on Expand/Collapse button in toolbar
Pls find the JSON attachment
this.dayWorkingTime=[
{
from:0,
to:23
}
];





this.taskSettings={
id:'TaskID',
name:'TaskName',
startDate:'StartDate',
duration:'Duration',
progress:'Progress',
endDate:'EndDate',
dependency:'Predecessor',
child:'Children',
manual:'isManual'
};
this.columns=[
{field:'TaskID',visible:false},
{field:'TaskName',headerText:'TaskName'},
{field:'StartDate',headerText:'StartDate'},
{field:'EndDate',headerText:'EndDate'}
];
this.editSettings={
allowAdding:false,
allowEditing:false,
allowDeleting:false,
allowTaskbarEditing:false,
showDeleteConfirmDialog:false
};
this.toolbar=['ExpandAll','CollapseAll','PdfExport','ExcelExport','CsvExport','ZoomToFit','ZoomIn','ZoomOut'];//'Add','Edit','Update','Delete','Cancel',
this.splitterSettings={
position:"25%"
}
this.labelSettings={
leftLabel:'TaskName'
};
this.timelineSettings={
timelineViewMode:'Month',
timelineUnitSize:100,
};
<ejs-gantt#gantt1id="gantt1"height="100%"[dataSource]="ganttData"[taskFields]="taskSettings"
readOnly=true[columns]="columns"[treeColumnIndex]="1"[dayWorkingTime]="dayWorkingTime"
[splitterSettings]="splitterSettings"[timelineSettings]="timelineSettings"
[labelSettings]="labelSettings"[editSettings]="editSettings"[allowSelection]="true"
[includeWeekend]="true"
[highlightWeekends]="true"allowPdfExport='true'allowExcelExport='true'[toolbar]="toolbar"(toolbarClick)="toolbarClick($event)"taskMode="Custom"[enablePredecessorValidation]="false">
ejs-gantt>


Attachment: GanttData_1415ab96.zip

Any help please


GS Gurpreet Singh June 16, 2021 06:33 AM UTC

We build browser apps, websites, mobile and desktop apps for many clients. And with that such great experience we were able to build below products that we sell to our customers
https://www.endurancesoftwares.com/


MS Monisha Sivanthilingam Syncfusion Team June 16, 2021 01:11 PM UTC

Hi Vin, 
 
Greetings from Syncfusion support. 
 
We have analyzed the issue you reported and would like to inform you that this issue occurs because the TaskID values in your data are not unique. The TaskID field acts as the primary key field in the Gantt. Hence, it should be unique for every record. Please ensure that the TaskID field is unique for every record in your data to avoid this issue. 
 
Regards, 
Monisha. 



VI vin June 17, 2021 03:07 AM UTC

Thanks
What is this error 
Cannot read property 'ganttProperties' of undefined
Error




MS Monisha Sivanthilingam Syncfusion Team June 18, 2021 02:15 PM UTC

Hi Vin, 
 
We have analyzed the issue you reported, however, we were unable to replicate the issue you reported. We created a sample using the data and code snippets you provided, however, the issue you reported was not replicated by us. Please share more details about the issue you reported, such as: 
 
  1. The use cases in which the issue you reported occurs.
  2. What are the steps taken to replicate the issue ?
  3. Can you please share a video replicating the issue ?
  4. Have you used tooltip template to display your tooltip ?
  5. What is the version of Gantt you are using ?
 
Please find the sample we used to validate your issue below. If possible, please modify the sample to replicate your issue or share issue reproducible sample of your own. 
 
 
Any information you could share with us will be useful to us in providing a solution to you. 
 
Regards, 
Monisha. 


Marked as answer
Loader.
Up arrow icon