Our state of the art Gantt chart


Post by amitcodeadda »

Hi,
I want to change ResourceUtilization chart value to our custom field value crew size

crewsize.png
crewsize.png (100.98 KiB) Viewed 297 times

.
How can I change the hour duration to crew size in ReactJs?


Post by arcady »

Hi,

The values are calculated by the Engine. So if you want to change the way it's calculated please check ResourceAllocationInfo class (its source code can be found in Engine/quark/model/scheduler_pro/SchedulerProResourceMixin.ts file). It has calculateAllocation method which does all related calculation. So you can override the method to implement some custom calculations.

Then as soon as allocation data is calculated the view displays it. In order to do this it calls the view onRecordAllocationCalculated method. So that's another place where some customization can be injected.


Post by amitcodeadda »

Hi,

I cannot find onRecordAllocationCalculated method in https://bryntum.com/docs/gantt/api/SchedulerPro/view/ResourceUtilization documentation. So please explain more about this method and how can we use this method in Reactjs?


Post by alex.l »

The code you need to check here is a part of the Engine, not SchedulerPro views.
This is internal method, you need to find the class Arcady mentioned by the path he mentioned, and read the code to understand the logic. Public methods for that class documented here https://bryntum.com/docs/gantt/engine/classes/_lib_engine_quark_model_scheduler_pro_schedulerproresourcemixin_.schedulerproresourcemixin.html
It doesn't matter what framework are you currently using, this class is used internally by our components which is framework agnostic.

All the best,
Alex


Post Reply