Resource Grouping & Hierarchy

Resources can be fixed to the top through the fixed property of the resource object. The fixed resources have to be placed before any other resource in the order of resources.

Resources can be placed into collapsible groups that can be collapsed or expanded on load through the collapsed property of the resource object. Parents have a slightly different styling compared to child elements that spans across the entire timeline. While the height of the rows are the same for all resources, these can be customized with CSS, the same way as seen in this example.

The hierarchy can be of multiple levels. Event creation, drag & drop is enabled for parent and child resources alike, that can be turned off through the eventCreation property of the resource object.

The width of the resource column adjusts dynamically as resources are expanded or collapsed to fit their content. The default increment step can be modified with a CSS rule, without affecting the algorithm's behavior:

.md-resource-grouping-hierarchy .mbsc-timeline-resource-depth-step {
            width: 20px;
            }

If the step adjustment is not needed and you want to keep the width of the resources column unchanged, you can disable it by setting the value to width: 0;.

Download and try example

Demo

Loading the live demo

Preview in full screen

Build a resource timeline with collapsible nested groups, pinned resources, and per-group event creation controls.

Code

mobiscroll.setOptions({
  locale:  ,
  theme: ' ',
  themeVariant: ' '
});

$(function () {
  $('#demo-resource-grouping-hierarchy')
    .mobiscroll()
    .eventcalendar({
      view: {
        timeline: {
          type: 'month',
        },
      },
      clickToCreate: true,
      dragToCreate: true,
      dragToMove: true,
      dragToResize: true,
      data: [
        {
          start: '2026-10-02T00:00',
          end: '2026-10-05T00:00',
          title: 'Event 1',
          resource: 'res1',
        },
        {
          start: '2026-10-10T09:00',
          end: '2026-10-15T15:00',
          title: 'Event 2',
          resource: 'res3',
        },
        {
          start: '2026-10-05T00:00',
          end: '2026-10-09T00:00',
          title: 'Event 3',
          resource: 'res4',
        },
        {
          start: '2026-10-12T00:00',
          end: '2026-10-14T00:00',
          title: 'Event 4',
          resource: 'res4',
        },
        {
          start: '2026-10-15T07:00',
          end: '2026-10-20T12:00',
          title: 'Event 5',
          resource: 'res10',
        },
        {
          start: '2026-10-03T00:00',
          end: '2026-10-10T00:00',
          title: 'Event 6',
          resource: 'res11',
        },
        {
          start: '2026-10-10T08:00',
          end: '2026-10-11T20:00',
          title: 'Event 7',
          resource: 'res12',
        },
        {
          start: '2026-10-22T00:00',
          end: '2026-10-28T00:00',
          title: 'Event 8',
          resource: 'res12',
        },
        {
          start: '2026-10-08T00:00',
          end: '2026-10-13T00:00',
          title: 'Event 9',
          resource: 'res6',
        },
        {
          start: '2026-10-25T00:00',
          end: '2026-10-27T00:00',
          title: 'Event 10',
          resource: 'res6',
        },
        {
          start: '2026-10-20T00:00',
          end: '2026-10-23T00:00',
          title: 'Event 11',
          resource: 'res5',
        },
        {
          start: '2026-10-15T00:00',
          end: '2026-10-20T00:00',
          title: 'Event 12',
          resource: 'res7',
        },
        {
          start: '2026-10-21T00:00',
          end: '2026-10-26T00:00',
          title: 'Event 13',
          resource: 'res2',
        },
        {
          start: '2026-10-01T00:00',
          end: '2026-10-03T00:00',
          title: 'Event 14',
          resource: 'res14',
        },
        {
          start: '2026-10-10T00:00',
          end: '2026-10-14T00:00',
          title: 'Event 15',
          resource: 'res15',
        },
        {
          start: '2026-10-04T00:00',
          end: '2026-10-07T00:00',
          title: 'Event 16',
          resource: 'res16',
        },
        {
          start: '2026-10-18T00:00',
          end: '2026-10-20T00:00',
          title: 'Event 17',
          resource: 'res17',
        },
        {
          start: '2026-10-26T00:00',
          end: '2026-10-29T00:00',
          title: 'Event 18',
          resource: 'res18',
        },
      ],
      resources: [
        {
          id: 'res1',
          name: 'Resource 1',
          color: '#1dab2f',
          fixed: true,
        },
        {
          id: 'res2',
          name: 'Resource 2',
          color: '#76e083',
          fixed: true,
        },
        {
          id: 'res3',
          name: 'Resource 3',
          color: '#4981d6',
        },
        {
          id: 'gro1',
          name: 'Group 1',
          color: '#ff1717',
          eventCreation: false,
          children: [
            {
              id: 'res4',
              name: 'Resource 4',
              color: '#f7961e',
            },
            {
              id: 'res5',
              name: 'Resource 5',
              color: '#34c8e0',
            },
          ],
        },
        {
          id: 'gro2',
          name: 'Group 2',
          collapsed: true,
          eventCreation: false,
          children: [
            {
              id: 'res6',
              name: 'Resource 6',
              color: '#843100',
            },
            {
              id: 'gro3',
              name: 'Group 3',
              color: '#af0000',
              collapsed: true,
              eventCreation: false,
              children: [
                {
                  id: 'res7',
                  name: 'Resource 7',
                  color: '#4caf00',
                },
                {
                  id: 'res8',
                  name: 'Resource 8',
                  color: '#7056ff',
                },
                {
                  id: 'gro4',
                  name: 'Group 4',
                  collapsed: true,
                  eventCreation: false,
                  children: [
                    {
                      id: 'res9',
                      name: 'Resource 9',
                      color: '#4caf00',
                    },
                    {
                      id: 'gro5',
                      name: 'Group 5',
                      collapsed: true,
                      eventCreation: false,
                      children: [
                        {
                          id: 'res10',
                          name: 'Resource 10',
                          color: '#e20000',
                        },
                        {
                          id: 'res11',
                          name: 'Resource 11',
                          color: '#d6d145',
                        },
                      ],
                    },
                  ],
                },
              ],
            },
          ],
        },
        {
          id: 'res12',
          name: 'Resource 12',
          color: '#e25dd2',
        },
        {
          id: 'res13',
          name: 'Resource 13',
          color: '#7056ff',
        },
        {
          id: 'res14',
          name: 'Resource 14',
          color: '#56aaff',
        },
        {
          id: 'res15',
          name: 'Resource 15',
          color: '#56ff89',
        },
        {
          id: 'res16',
          name: 'Resource 16',
          color: '#ff6e56',
        },
        {
          id: 'res17',
          name: 'Resource 17',
          color: '#ffd756',
        },
        {
          id: 'res18',
          name: 'Resource 18',
          color: '#8b56ff',
        },
        {
          id: 'res19',
          name: 'Resource 19',
          color: '#56d9ff',
        },
      ],
    });
});
  

Duplicate Session

You have signed in on a different machine. To keep everything in sync, you have been signed out of this session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.

Duplicate Session

We noticed you are logged in on a different machine and have closed your old session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.