We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Hours per day / 5-6 working days

Hello,

1) Currently we are using timescale property in order to define hours per day. Is there any configuration available by which we can change it to 8.5/9 hours per day?

2) We use IncludeWeekend(false) to make sat sun as week off and IncludeWeekend(true) makes 7 days a week. Is there anything by which we can make 6 days a week/4 days a week etc? e.g. Only sunday will be a weekoff so its 6 days a week.

3) How to make use of resource assignment. e.g. Currently we define resource assignment from our system. Can we accomodate that assignment into gantt so that gantt will manage everything based on the assignment we have provided?

4) How can we Fix Start or End Date, so based on Work, if End Date is fixed than Start Date will change automatically by reverse calculation.

5) Not sure if this functionality is there or not, but is there any way we can save the Project Schedule as Baseline?



1 Reply

JS Jonesherine Stephen Syncfusion Team January 9, 2017 12:24 PM UTC

Hi Kuntal, 
Please find the response below: 
Query1:  Currently we are using timescale property in order to define hours per day. Is there any configuration available by which we can change it to 8.5/9 hours per day? 
Solution: We can customize the working time by using dayWorkingTime property.  
Please find the code example below: 
.DayWorkingTime(work => 
         {             
          work.From("08:00 AM").To("06:00 PM").Add(); 
         }) 
 
Query2: We use Include Weekend (false) to make sat sun as week off and Include Weekend (true) makes 7 days a week. Is there anything by which we can make 6 days a week/4 days a week etc.? E.g. only Sunday will be a week off so its 6 days a week. 
Solution: At present there is no support to customize the weekend in Gantt. Hence we have already logged a feature request regarding this. It will be implemented in any of our upcoming release. 
 
Query3: How to make use of resource assignment. E.g. currently we define resource assignment from our system. Can we accommodate that assignment into Gantt so that Gantt will manage everything based on the assignment we have provided? 
Solution: Currently mapping of resource name and work unit validations will be performed based on resource allocation. At present there is no support for resource over allocation. We have already logged a feature request regarding this. It will be implemented in any of our upcoming release. 
 
Query4:How can we Fix Start or End Date, so based on Work, if End Date is fixed than Start Date will change automatically by reverse calculation 
Solution: At present there is no support for constraint type in Gantt to set to fixed start Date/End Date in Gantt. Hence we have logged a feature report regarding this. It will be implemented in any of our upcoming release. 
 
Query5: Not sure if this functionality is there or not, but is there any way we can save the Project Schedule as Baseline? 
Solution: We have prepared the work around and in button click action  
We have saved the schedule start Date/end Date as baselineStartDate /baselineEndDate.  
And refreshed the data source using set Model in Ajax. 
Please find the code example below: 
function clickme(args) { 
            var ganttObj = $("#Gantt").data("ejGantt"); 
            records = ganttObj.model.dataSource; 
  //To set the schedule date as baseline date 
            $.ajax({ 
                type: "POST", 
                url: "Gantt/BaselineSave", 
                data: JSON.stringify({ Task: records }), 
             contentType: "application/json; charset=utf-8", 
                dataType: "json", 
                success: function (result) { 
                    refreshGantt(); 
                } 
            }); 
        }  
 function refreshGantt() { 
//To refresh the Gantt with modified baseline 
            $.ajax({ 
                type: "POST", 
                url: '/Gantt/GetUpdatedGanttdata', 
             contentType: 'application/json; charset=utf-8', 
                success: function (result) { 
                    var data = ej.parseJSON(result) 
                    ganttObj = $("#Gantt").data("ejGantt"); 
                    ganttObj.setModel({ "dataSource": data }); 
                } 
            }); 
        } 
We have also prepared the sample based on this, please find the sample from below location. 
 
Regards, 
Jone sherine P S 


Loader.
Live Chat Icon For mobile
Up arrow icon