Introduction

A generic instance to visualise any kind of scheduling data along a timeline. The model data needed by the class consists of rows with activities, links between activities, and layers to group activities together.

Structure

The instance consists of several children instances:

  • InfoColumn: shown on the left-hand side to display a hierarchical structure of rows, and additional data (like here indexes).
  • Graphics: shown on the right-hand side to display a graphical representation of the model data.
  • Timeline: shown above the graphics element. The timeline itself consists of two child: the Dateline and the Eventline.
  • Dateline: displays days, weeks, months, years, etc...
  • Eventline: displays various time markers.

The screenshot below shows the initial appearance of an empty GanttChart.

Model

The GanttChart itself doesn't really have any requirements for a model. It is simply providing convenience methods for the underlying elements (graphics view, dateline, eventline...). The following table lists the relevant methods:

MethodDescription
gantt.getRows(): Row[]
Gets the rows of the GanttChart.
gantt.getLayers(): Layer[]
The list of model layers that will be displayed by the graphics.
gantt.getLinks(): IntervalTree[]
The list of links that will be displayed by the graphics.
gantt.getCalendars(): Calendar[]
The list of calendars that will be displayed by the graphics.

Standalone vs. Multiple GanttCharts

A Gantt chart can be used standalone or coupled with other Gantt charts. You can decide to synchronise different properties of the Gantt chart like its Activities, Timeline...