- Home
- Forum
- Angular - EJ 2
- Error on task length
Error on task length
Hello,
I'm trying the Gantt chart component, I'm having an issue where the component is displaying tasks longer than expected (didn't shorter task for now) you can see my dataset and the result the component is displaying in the screenshots that follows :


I'm trying the Gantt chart component, I'm having an issue where the component is displaying tasks longer than expected (didn't shorter task for now) you can see my dataset and the result the component is displaying in the screenshots that follows :
You can see the same the same error in the documentation in this link : https://ej2.syncfusion.com/angular/documentation/gantt/duration-unit/#defining-duration-unit-along-with-duration-field
On the task ID 7 the duration is 3 days but the component is actually displaying 5 days length.
On the task ID 7 the duration is 3 days but the component is actually displaying 5 days length.
SIGN IN To post a reply.
2 Replies
1 reply marked as answer
BM
Benjamin MALBREL
August 14, 2020 09:28 AM UTC
So I figured something out on my dataset, the component is expecting to be from 9 to 15 so it expends one task to respect this constraint. I changed my dataset a little bit and it didn't change the issue I'm having. Here you can see what's happening :


Regards
LG
Logeswari Gopalakrishnan
Syncfusion Team
August 17, 2020 07:08 AM UTC
Hi Benjamin,
We have analyzed your query and you are expecting parent task which should be rendered from 9 to 15 which was provided in a data source. In the Gantt Chart, all the parent task is dependent on their child task. The start date and end date of the parent task will be calculated based on the minimum start date of the child task and maximum end date of the child task even parent task have a start date and end date value in the data source. From your data source, the minimum start date-time is 9 (Task 2) and the maximum end date-time is 14 (Task 3).
In Gantt, dates are validated based on the predecessor, dayWorkingTime, includeweekend, holidays. And when the duration field is mapped, the end date is calculated based on start date and duration.
In UG: For the Task 7, Start date is 4/4/2019 and duration value is 3 hence End date will be 4/6/2019. But 4/6/2019 and 4/7/2019 are week end so end date will be rendered on 4/8/2019.
In Datasource from attached screen shot: For the Task 3, Start time is 11 and duration is 180minute hence End time will be 13. But by default, value of the dayWorkingTime property is 13-14. So, end time will be rendered on 14.
Please refer the below UG links for weekend and day working time.
dayWorkingTime: https://ej2.syncfusion.com/angular/documentation/gantt/task-scheduling/#working-time-range
includeWeekend: https://ej2.syncfusion.com/angular/documentation/gantt/task-scheduling/#weekendnon-working-days
Please let us know, if you need further details on this.
Regards,
Logeswari G
Marked as answer
SIGN IN To post a reply.
- 2 Replies
- 2 Participants
- Marked answer
-
BM Benjamin MALBREL
- Aug 14, 2020 08:20 AM UTC
- Aug 17, 2020 07:08 AM UTC