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

Gantt Resource View without start and end dates

Hi,

I'm trying to plot task on Gantt without any start or end date. It just have number of days each month. Our data just consists of number of days a resource will work on a project each month. A resource will be allocated to multiple projects in a month. Something like below

I would like to show each resource's availability during each month, for planning purposes, like below using the above data

Whats the best way to achieve this? we are looking into unscheduled tasks, but from the online demo it seems like it will plot the below each other not next to each other.

Any suggestions are highly appreciated.

Note for forum moderators:
Gantt is not available as a control to select while posting a new thread hence posted under Chart. Please move to appropriate section.

Thanks

Amit


3 Replies

JS Jonesherine Stephen Syncfusion Team March 4, 2019 04:20 PM UTC

Hi Amit, 
Using Create client-side event we have calculated start date as per the duration and month date. Updated Gantt data using setModel. Using QueryTaskbarInfo client-side event we have customized the taskbar color. 
Please find the code example below: 
function queryTaskbarInfo(args) { 
    if (args.data.taskName == "PROJ_A") { 
        args.taskbarBackground = "#005094"; 
    } 
    else if (args.data.taskName == "PROJ_B") { 
        args.taskbarBackground = "#007600"; 
    } 
} 
function create(args) { 
    var modifiedData = [], 
        flatRecord = $.extend([], args.model.flatRecords); 
    for (var i = 0; i < flatRecord.length; i++) { 
        for (var j = 0; j < flatRecord[i].eResourceChildTasks.length; j++) { 
                                      //... 
            modifiedData.push(flatRecord[i].eResourceChildTasks[j].item) 
        } 
    } 
    this.setModel({ "dataSource": modifiedData }); 
} 
 
We have also prepared the sample based on this. Please find the sample from below location. 
 
Regards, 
Jone sherine P S


AD Amit D March 5, 2019 02:22 AM UTC

Hi Jone,

That is just fantastic. Much appreciated.

Thanks a lot for the response and sample code. I will pass it on to our developers.

Regards,
Amit


JS Jonesherine Stephen Syncfusion Team March 5, 2019 09:06 AM UTC

Hi Amit, 
Thanks for your update. 
Please let us know if you need further assistance on this. 
 
Regards, 
Jone sherine P S  


Loader.
Live Chat Icon For mobile
Up arrow icon