Premium support for our pure JavaScript UI components


Post by kevin.snps »

Hi team,
I am using schedulerPro with resource histogram, an overridding the calculationAllocation method in base.ResourceAllocationInfo.

Can you tell me how the assignments (calculated at the beginning of the method) is calculated?
I haven't change the part of the custom method where the assignments are calculated.
The reason I am asking this, is that the assignments are empty depending on the columns of the schedulerPro, and I am investigating the cause.

*calculateAllocation() {
  const result = [],
    ticksCalendar = yield this.ticks,
      //$.ticks,
    resource = yield this.$.resource,
    includeInactiveEvents = yield this.$.includeInactiveEvents,
    assignments = yield resource.$.assigned,
    assignmentsByCalendar = new Map(),
    eventRanges = []; // collect the resource assignments into assignmentsByCalendar map
...
}

I would appreciate your support.


Post by arcady »

assigned is a special type of identifier called "bucket" (check this property it has an example of using such identifiers).
It's calculated by Chronograph (the reactive graph the Engine is based on) based on assignment store data.

If you see that a resource assigned identifier is empty yet you know for sure that the resource does have some assignments please provide us with a test case and we'll check what's going on.


Post by kevin.snps »

Thank you arcady.
We have gone through the datas, and managed to get the assignments in the calculateAllocation method.


Post Reply