Large Dataset Performance

The timeline supports virtual horizontal and vertical scrolling. The view virtualization makes it possible to work with many resources across long date ranges.

The following examples shows that navigating 200 resources across a whole year with 10000 events won't pose any problems for the browser neither on mobile or desktop.

View virtualization is always enabled and doesn't need to be turned on explicitly.

Download and try example

Demo

Loading the live demo

Preview in full screen

Handle thousands of events and resources in a Timeline — virtual scrolling keeps navigation smooth across long date ranges on mobile and desktop.

Code

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

(function () {
  function getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min) + min);
  }

  var resourceNr = 200;
  var eventsNr = 10000;
  var myResources = [];
  var myEventColors = ['#ff0101', '#239a21', '#8f1ed6', '#01adff', '#d8ca1a'];

  for (var i = 1; i <= resourceNr; i++) {
    myResources.push({ name: 'Resource ' + i, id: i });
  }

  mobiscroll.eventcalendar('#demo-big-data', {
    clickToCreate:  ,
    dragToCreate:  ,
    dragToMove:  ,
    dragToResize:  ,
    eventDelete:  ,
    resources: myResources,
    view: {
      timeline: {
        type: 'year',
        eventDisplay: 'fill',
      },
    },
    onPageLoading: function (args, inst) {
      setTimeout(function () {
        var myEvents = [];
        var year = args.firstDay.getFullYear();
        // Generate random events
        for (var i = 0; i < eventsNr; i++) {
          var day = getRandomInt(1, 31);
          var length = getRandomInt(2, 5);
          var resource = getRandomInt(1, resourceNr + 1);
          var month = getRandomInt(0, 12);
          var color = getRandomInt(0, 6);
          myEvents.push({
            color: myEventColors[color],
            end: new Date(year, month, day + length),
            resource: resource,
            start: new Date(year, month, day),
            title: 'Event ' + i,
          });
        }
        inst.setEvents(myEvents);
      });
    },
  });
})();
  

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.