- Home
- Forum
- React - EJ 2
- Resources Not Displayed on Task
Resources Not Displayed on Task
Hi, I did same thing in the below but in my application, the resource name not showing. What is wrong with my code? The stackblitz URL is : Sample
I think my resources have problem because it doesnt display resources on leftlabel too. but Taskname showing with rigthlabel.
when I write this I found the problem below : )
I use resources not Resources, that is the problem for
Hi Emrah,
Greetings from Syncfusion Support,
We suspect that the shared code snippet is causing the issue. Based on
our analysis, if resources are not explicitly passed and the dataSource is
directly used with embedded resources, the reported case can be replicated. To
resolve this, the resourceCollection must be explicitly passed to the
Gantt chart. Below, we have attached the corrected code snippet and a sample
for your reference.
|
// data collection
export let editingData = [ { ... subtasks: [ { TaskID: 2, TaskName: 'Identify site location', StartDate: new Date('04/02/2024'), Duration: 0, Progress: 30, Resources: [{ resourceId: 1, resourceName: 'Martin Tamer' }], info: 'Measure the total property area alloted for construction' }, { TaskID: 3, TaskName: 'Perform Soil test', StartDate: new Date('04/02/2024'), Duration: 4, Predecessor: '2', Resources: [{ resourceId: 2, resourceName: 'Rose Fuller' }], info: 'Obtain an engineered soil test of lot where construction is planned.' + 'From an engineer or company specializing in soil testing' }, { TaskID: 4, TaskName: 'Soil test approval', StartDate: new Date('04/02/2024'), Duration: 0, Predecessor: '3', Progress: 30 }, ] }, ... ]; { resourceId: 1, resourceName: 'Martin Tamer' }, { resourceId: 2,
resourceName: 'Rose Fuller' }, ]; ... </GanttComponent> ... resourceInfo: 'Resources' }; const resourceFields = { id: 'resourceId', name: 'resourceName' }; |
You can find a working example on StackBlitz.
For more information, you may refer to the following
link:
Resources in React Gantt component | Syncfusion
If you have any further questions or need additional assistance, please let me
know!
Regards,
Ajithkumar G
- 2 Replies
- 2 Participants
-
EA Emrah Asma
- Nov 22, 2024 07:59 AM UTC
- Nov 25, 2024 11:19 AM UTC