Unable to get resourceView groupCollection to work

Hi

I've recently tried to add Groups to our gantt resource view, but I've been unable to do so.
After I added the groups, the groups will be displayed correctly, but there will be no resources shown in them.
If I remove this following lines (removing groups from the chart), all resources will once again be displayed correctly.

groupCollection: res.departments,
groupIdMapping: "GroupId",
groupNameMapping: "Name"

I've attached a file where I've added the methods used to set up the resourceChart and an example of the objects used



Attachment: ResourceChartGroups_96def4be.zip

3 Replies 1 reply marked as answer

PP Pooja Priya Krishna Moorthy Syncfusion Team June 2, 2020 01:05 PM UTC

Hi Martin, 
Thanks for sharing the code snippet.  
We are able to reproduce the reported issue when same field is used in resourceNameMapping and groupNameMapping. Please use unique field name to avoid the reported issue.  

$("#GanttContainer").ejGantt({ 
  //... 
     resourceIdMapping: "resourceId", 
     resourceNameMapping: "resourceName", 
     groupIdMapping: "GroupId", 
     groupNameMapping: "GroupName", 
}); 
Please find the below sample and documentation link. 

Regards, 
Pooja K 


Marked as answer

MM Martin McSharry June 3, 2020 02:16 PM UTC

Thanks Pooja, that fixed it.


PP Pooja Priya Krishna Moorthy Syncfusion Team June 3, 2020 05:40 PM UTC

Hi Martin, 
We are happy to hear that your issue has been resolved. 
Please get back to us if you would require any further assistance. 

Regards, 
Pooja K 


Loader.
Up arrow icon