Our state of the art Gantt chart


Post by gaurav.tyagi »

Hi,
I am using Gantt Resource Utilization grid for my project needs. But I need to override the default behavior of this component.

  • Instead of % units in the resource assignment grid, I need to use 'hours' which is a numeric value indicating effort.
  • Instead of using the task start and end date for the effort computation, I want to use the start and end dates assigned to every resource in the resource assignment column( as shown in the sample project)
  • Instead of automatically using 24 hours as effort per day for a resource, I want to provide the capacity of the resource dynamically through code.

Can this be achieved? If so, can you let me know how ?

Thanks,
Amulya

Attachments
gantt-resource-utilization.zip
(307.02 KiB) Downloaded 30 times

Post by arcady »

That is not supported out of the box and implementing this will take some decent amount of time I'm afraid.

Thing is this is not just utilization panel changes. Assignments and effort take part in task scheduling (depending on task schedulingMode and effortDriven flag). So the changes will affect task effort, startDate, endDate and duration calculations on the data level.

If you up to implementing this please check calculateStartDate, calculateEndDate, calculateEffort, calculateDuration methods code. The methods source code can be found in mixin classes in Engine/quark/model/scheduler, Engine/quark/model/scheduler_pro and Engine/quark/model/gantt folders.

PS Or as an option you can hire us for implementing these features. If that works for you please contact sales at bryntum.com for a quote.


Post by gaurav.tyagi »

Hello,

What if I don't need the component to do these computations for me, instead I want to replace the values computed from your side with my own data.
Is is possible to change the values displayed in the UI?


Post by arcady »

Sure it's possible just override the component(s) code the way you need.


Post by gaurav.tyagi »

Hello,

Is there any specific model class I need to extend ?
Do you have any sample demo project or documentation that I can follow where this component is overridden?

I just need to change the behavior of the right subgrid of the component. It would be great if you can provide any sample code for the same.

Thanks.


Post by alex.l »

No, we don't have examples for this. You simply want to create your own component with your own logic, I am not sure what example might be useful here. You just need another component based on different dataset.

Please review these files
SchedulerPro/lib/SchedulerPro/view/ResourceUtilization.js
SchedulerPro/lib/SchedulerPro/view/ResourceHistogram.js
SchedulerPro/lib/Core/widget/graph/Histogram.js

to see the full logic and understand how it works now.
I guess you'll need to write your own component based on ResourceHistogram or even on SchedulerProBase, depends on how deep you'll need to go.

Histogram class is drawing a chart. check series, data, drawBar, drawOutline methods.

Feel free to contact our Sales for Professional Services if you'll need help of our developers. https://www.bryntum.com/services

All the best,
Alex


Post by gaurav.tyagi »

Hello,
Do you have any other sample code with overriding any of the js files(not only resourceUtilization), that might be helpful for me?

Also, is it really necessary to write my own component based on these js classes for my scenario? Because all I need to do is to show my own values on the same component UI.
Is it possible to just use java script functions to fetch the cell elements and replace the text displayed with my own custom text? Or is there a more optimal solution to achieve this?

Thanks.


Post by alex.l »

Do you have any other sample code with overriding any of the js files(not only resourceUtilization), that might be helpful for me?

Not sure I got the question. You mean extending JS classes? We use it everywhere in the code. You are trying to implement a component with different behaviour, I don't think you will deal with that by overriding of couple of methods. It will also broke the original component. I guess it will be better to just extend it.

Also, is it really necessary to write my own component based on these js classes for my scenario?

I don't know exactly. It depends on how far you are going to go and if you need an original ResourceUtilization, because when you override, it will change the logic of entire class. So extend is just more clear solution.
ResourceUtilization is based on very special format of AllocationReports, that use very special data with some set of attributes that Engine calculated. So, as a part of solution, you'll need to change that AllocationReports to something else, that you expect.
It's not about change the text from "hours" to "days" on the UI.
This is not trivial task and unfortunately, we cannot provide you solution in bounds of support. You just need to review the code to understand how it works and create the logic you need.

All the best,
Alex


Post by gaurav.tyagi »

Hi Alex,

Where can I find the code for ResourceUtilization and ResourceHistogram Classes?
I don't see it in node modules.

Also, I am not using SchedulerPro, I am using bryntum gantt only. Not sure if that makes a difference.

Thanks.


Post by alex.l »

Please download the code from Customer Zone and check lib folder.

I mentioned how to find it here
viewtopic.php?p=113385#p113385

For Gantt it will be same path except first SchedulerPro folder.

All the best,
Alex


Post Reply