The position is calculated based on the resource calendar. It basically shows the resource availability for the tick.
The values displayed by the histogram are calculated by the Scheduling Engine.
For each resource it builds ResourceAllocationInfo class instance which provides data to the histogram. The class source code can be found in
Engine/quark/model/scheduler_pro/SchedulerProResourceMixin.ts file. So one can extend that class to implement any custom logic.
And ResourceHistogram class has
renderRecordAllocationInfo method which gets called to render calculated data. So this can also be overridden to do some customization.
Hi Arcady thanks for the information , it really helped us .
We would like to know if the maximum load value in the resource histogram can be changed.
Currently its fixed at 24 hours.
But suppose we use grams as metrics then there could be 100grams , 250grams in those cases the max load should be set appropriately
if we try to changed the tickData.maxEffort = 250 * (Unit value that is needed for resource histograms ) the red line disappears.
We have tried this to hours as well ,
if we try to pass in 30 hours as the interval duration (converted to Ms) and assign it to tickData.maxEffort. the red line disappears.
Is there a solution or a work around for this .
Resource histogram displays amount of time and not grams.
Bar heights represent time. Row heights represent time and equal timeaxis tick duration (so they depend on current zoom level). And the maximum allocation line also represents time..
If timeaxis tick represents a day then the row height matches 24 hours (plus some margin by default equal 10% of row height). If you multiply
250 then the resulting value will probably be greater than
24hrs and thus will not be displayed. It's just greater than the max that fits into the row height.
If you need to display
grams then probably you don't need resource histogram since it hows resource effort allocation.
You can try building your own component. We have generic https://www.bryntum.com/docs/gantt/api/Core/widget/graph/Histogram that renders bars. It can be used to build rows.
Hi arcady , thanks for the information.
Is there any example or any resource which points to how we can use just the histogram by itself . We want be able to display not only time axis (24hours) but also different unitns such as 100grams , 200 mtrs etx.
Is it possible by histogram widget and if so please let us know where we can find the reference to histogram code (In any of the examples
Unfortunately, there is no examples with Histogram graph itself, it's a base class that we used to build our "meaningful" for business logic histograms.
You can easily find the source code in Histogram.js file in our sources, as well as ResourceHistogram.js
please check lib/Core/widget/graph/Histogram.js and lib/SchedulerPro/view/ResourceHistogram.js
The methods you need to use/change to make your own calculations are mentioned by Arcady above.
If you need an assistance in development, you are welcome to contact our sales and hire us here https://www.bryntum.com/services
All the best,