Our pure JavaScript Scheduler component


Post by hammadch360 »

Hi. Hope you are well. I have a query related to resource histogram. So, Basically, I am working on a resource management tool using the bryntum scheduler. In the sidebar(as you can see in Screenshot), I have clients and then projects under clients and then resources under projects. Clients and projects are added through the open form using the appendChild method but for resources, I have a list of resources that comes from the backend. Resources will be assigned to the project according to needs. And we can assign the same resource to the different projects. How I have added the multiple resources is with different ids and added in one unique resources id to the object to identify the same resource. I am also using a resource histogram in it to show over allocation. But the challenge I am facing is to show the same resources (assign to a different project) of over-allocation in a
resource histogram. Can you tell me how I can do this?
Thanks

Attachments
save resou 1.png
save resou 1.png (91.65 KiB) Viewed 428 times
same res.png
same res.png (121.22 KiB) Viewed 428 times

Post by alex.l »

Hi hammadch360,

ResourceHistogram is only display data that you passed into it, every line - is resourceStore's record.
The only way here to reach that is prepare well formatted (grouped) data and use it in ResourceHistogram. I mean create own project model for it and don't share it with scheduler. Histogram still may be partnered with scheduler in that case, but you will be needed to track project changes and update histogram by your own.

All the best,
Alex


Post by hammadch360 »

Thanks for your response
Could you tell me how I can achieve that, I mean how to prepare grouped data and all that you are saying? Any example will be helpful for me.
Thanks


Post by alex.l »

Hi hammadch360,

I meant to group your resources by your second ids - so you will have only 1 instance of resource independent of project and client, and all events should have id of that resource in assignments. Prepare new data and load them into project of your ResourceHistogram.

We don't have any examples of such grouping and I am afraid you'll need to make more overrides in the future because of next:

  1. Because you expect that resource in different project is still 1 resource but in fact they are different, event scheduling may be working not as you expected, as well as calendars and allocations limits in histogram. After you group your resources in different way, the result may be different than you expected. Think more about it.
  2. SchedulerPro is designed to manage only 1 project at once. You can see the name of our main model - ProjectModel. So maybe create few projects and load them separately?
  3. ResourceStore should contain resources - not clients, projects, resources at once. Different kind of models usually stored in different stores/tables and connected via dependencies one-many, one-one, many-many. SchedulerPro supports only resources. That's why you had that problem with storing data with same ids - because it shouldn't be duplicated in 1 store/table.

So, that may be tricky to implement your concept. You may ask for consulting/help from our developers using our Professional Services (check https://www.bryntum.com/services )

All the best,
Alex


Post by hammadch360 »

Thanks for your response, let me think how I can do that. :)


Post Reply