Build custom tree tables in ScheduleJS using schedule-info-column-header-cell and schedule-info-column-row-cell components.
In this article, we will discover a step-by-step implementation on how to use the ScheduleJS API to synchronize multiple graphics together and use a single timeline for two or more graphics.
To keep things simple let’s set our objective first:
<demo-schedule-booking> demonstration component. This component is capable of displaying a ScheduleJS Gantt chart.Note that the same approach can be used with two completely different graphics.
A good idea is to use a containerized version of our graphics to be able to handle the display of multiple graphics with ease, using components.
Now let’s start by creating a dual-gantt component and try out our <demo-schedule-booking> component.
Fow now, if our <demo-schedule-booking> component is functional, our dual-gantt component will display the following screen, which is in fact identical to the original component.
Now we can create a <div> and use our <demo-schedule-booking> component twice in our brand new dual-gantt component:
We added CSS classes to properly display one graphic above the other and separate them with a border. Here, the gantts-container class handles the display while the first-gantt and the second-gantt classes handle specificities, like the separation border.
We now have two unsynchronized graphics inside our new dual-gantt component:
To further improve the display, we adapted our <demo-schedule-booking> component to accept two new input properties:
displayTimeline: True by default, as we are going to use a single timeline, it is not necessary to repeat the timeline in both graphics.displayButtonBar: True by default, will let us hide the button bar to only keep one button bar for both graphics.As a ScheduleJS Gantt component, <demo-schedule-booking> also accepts additional inputs by default. Here we will use the dragToResizeInfoColumnPrevented input property to prevent any individual info-column resize for both graphics. The result should get rid of the button bar and timeline for the second graphics:
We want to create a new timeline object and pass it down to our graphics once our dual-gantt component mounts. Here is the source code of our dual-gantt component:
Now we have to pass down our new timeline object as an input to our <demo-schedule-booking> ScheduleJS Gantt component in the dual-gantt component template:
The last step is to register the timeline in the <demo-schedule-booking> component.
To do so, we decided to create a setter method, which will run the registration code when the input is passed down to the component:
The following video shows the synchronized graphics:
This example is just a simple implementation of synchronized graphics. The goal of this article is to illustrate how you can quickly combine multiple graphics to build a unique screen. You can use the same principles to combine different kinds of graphics (histogram, Gantt, curve) as we do in the ScheduleJS Viewer for example!
Build custom tree tables in ScheduleJS using schedule-info-column-header-cell and schedule-info-column-row-cell components.
Unlock flexible row management in ScheduleJS: control individual row heights, mix GanttLayout and ChartLayout in the same view.
Master drag and drop in ScheduleJS: render activities while dragging, access the drag canvas via DragViewTransversalSystemLayers.
ScheduleJS 1.4 release notes. A step forward towards modern Angular app building.
Angular 16 vs Angular 18 comparison: discover what's new in Angular, the arrival of signals, Zoneless mode, zone coalescing, and their impact on your projects.
Discover the Angular Rome Conference: workshops, domain-driven design, signals, state management, micro frontends.
Discover Angular 18: zoneless mode, zone coalescing, native await, and TypeScript 5.4 compatibility.
The TOP 3 JavaScript Gantt chart. Discover their features, advantages, and disadvantages to choose the best tool for your project.
Discover how ScheduleJS seamlessly integrated with Selligent CRM, enhancing scheduling efficiency for a leading beauty brand's consultants.
This article showcases the integration of a ScheduleJS component into an external Ag-Grid table, to demonstrate the flexibility of ScheduleJS.
© Copyright 2026 – Site Map – All rights reserved – Privacy Policy – Terms of use – Cookies Policy – AISO SA