Our state of the art Gantt chart


Post by Jeba »

Hi Dev Team,
We have two Resource Histograms where one displays resource names while the other shows resource type as shown below and we have only one resource store. Our requirement is to show distinct values of resource type in the Resource histogram, so we want a summarized record of each resource type.
For Example, you can see the picture I have shared below B1 is repeating but we want only one B1 with the summarized value of all the three B1's shown

Attachments
Histogram.png
Histogram.png (18.41 KiB) Viewed 681 times

Post by mats »

Please see our previous responses, you have to provide the data you want visualized, in the format we expect. As stated earlier, we don't do any processing of the data for this widget.


Post by Jeba »

Hi Dev Team,

We have two instances of scheduler pro Resource Histograms on a page, where one displays resource names while the other shows resource type as shown below. We have only one resource store. Our requirement is to show distinct values of resource type in the 2nd resource histogram, so we want a distinct record of each resource type.

Find below our resource store:

"resources" : {
"rows" : [
{ "id" : 1, "name" : "Celia", "city" : "Barcelona", "description": "Airframe", "type" : "B1" },
{ "id" : 2, "name" : "Lee", "city" : "London", "description": "Airframe", "type" : "B1" },
{ "id" : 3, "name" : "Macy", "city" : "New York", "description": "Airframe", "type" : "B1" },
{ "id" : 4, "name" : "Madison", "city" : "Barcelona", "description": "Avionics", "type" : "B2" },
{ "id" : 5, "name" : "Rob", "city" : "Rome", "description": "Avionics", "type" : "B2" },
{ "id" : 6, "name" : "Dave", "city" : "Barcelona", "description": "Avionics", "type" : "B3" },
{ "id" : 7, "name" : "Dan", "city" : "London", "description": "Avionics", "type" : "B3" },
{ "id" : 8, "name" : "George", "city" : "New York", "description": "Inspector", "type" : "B3" },
{ "id" : 9, "name" : "Gloria", "city" : "Rome", "description": "Inspector", "type" : "B2" },
{ "id" : 10,"name" : "Henrik", "city" : "London", "calendar" : "business", "description": "Inspector", "type" : "INSP" }
]
},

For Example, you can see the picture I have shared below: B1 is repeating. We want distinct values of the type field. Kindly refer to the resource store definition we have shared above.

Attachments
Histogram.png
Histogram.png (18.41 KiB) Viewed 678 times

Post by pmiklashevich »

Hello,

So you want to have one line per skillNumber. And show summary of all events which are assigned to resources that have that skillNumber. In other words you want to merge the resources. It is not supported out of the box. You can try to implement it yourself or hire us to do that for you. Please check out the page: https://www.bryntum.com/services/

The general idea is that the ResourceHistogram widget takes the Project as an input and generates some data to show the charts. In our example the project is shared between the Scheduler and the ResourceHistogram widget. In you case you need to prepare data first, so our widget will take the data and visualize it the way you want. For that you need to create a copy of the Project. You can create a new Project instance and chain all stores from the original Project. Then transform the resources/events according your needs.

Just to let you know, there was a similar request with the data structure you provided. The topic was about group summary records for resource histogram. Not sure if this is useful for you. Please take a look: viewtopic.php?f=52&t=16440

Best wishes,
Pavel

Pavlo Miklashevych
Sr. Frontend Developer


Post by Jeba »

Hi Pmiklashevich,
As you mentioned we have tried creating a new Project instance and chained all stores from the original Project as follows

let projectn = new ProjectModel(projectConfig);
  projectn.resourceStore= 
      project.resourceStore.makeChained(
        () => true
    );
  projectn.assignmentStore=
    project.assignmentStore.makeChained(
      () => true
  )
  projectn.eventStore=
  project.eventStore.makeChained(
    () => true
  )
  projectn.calendarManagerStore=
  project.calendarManagerStore.makeChained(
    () => true
  )
  projectn.dependencyStore=
  project.dependencyStore.makeChained(
    () => true
  )

and called the project in one of the TabPanel

{
          title: "Skill Availability",
          items: [
            (me.histogram = new ResourceHistogram({
              ...histogramConfig,
              projectn,
              partner: me.gantt,
            })),
          ],
 },

But we are getting "no records to display" as you can see in the image attached.
Is my approach correct or any changes have to be done

Attachments
Screenshot (321).png
Screenshot (321).png (23.86 KiB) Viewed 657 times

Post by saki »

The first task would be to find out if you have data in the chained stores and if that data makes sense (for example time range of the histogram would be the time range of the data; correct relation between resources and tasks in assignmentStore, etc.)

Note: It is not necessary to pass filter function to makeChained because the default is to include all records. https://bryntum.com/docs/scheduler/#Core/data/Store#function-makeChained


Post Reply