Introduction

A row object is used to store the activities found on a row of the Gantt chart. These activities are not stored directly on the row but in an activity repository. The default repository is of type IntervalTreeActivityRepository. Activities can be placed on lines within the row. The row delegates this work to a LinesManager. The default manager is of type EqualLinesManager.

Type Arguments & Hierarchy

Three type arguments are needed to define a row. The first one defines the type of the parent row, the second one defines the type of the children rows, the third one defines the type of the activities shown on the row. The following is an example that defines a Building, that is part of a Factory. The building has Machines in it. In the building row we are showing Shifts for the activity.

Row representing a building
export class Building extends Row<Factory, Machine, Shift> { }

A model like this would allow us to display a hierarchy in the Gantt chart that might look like this:

  • Factory → Shift
    • Building 1
    • Building 2
    • Building 3
      • Machine A
      • Machine B
    • Building 4
      • Machine C
      • Machine D

Methods

MethodsDescription
row.isExpanded(): boolean
row.setExpanded(value: boolean)

Controls whether the row will show its children rows or not.

row.getHeight(): number
row.setHeight(height: number)

Gets / sets the current height of the row.

row.getMinHeight(): number
row.setMinHeight(height: number)

Gets / sets the minimum height of the row.

row.getMaxHeight(): number
row.setMaxHeight(height: number)

Gets / sets the maximum height of the row.

row.getLayout(): Layout
row.setLayout(value: Layout)

Gets / sets the layout used by the row. The default is Gantt Layout.

row.getLineCount(): number
row.setLineCount(lineCount: number)

Gets / sets the number of inner lines to show within the row.

row.getLinesManager(): LinesManager
row.setLinesManager(value: LinesManager)

Gets /sets the lines manager used for controlling the lines, their location, their height, the placement of the activities.

row.getName(): string
row.setName(name: string)

Gets / sets the name of the row, e.g. "Machine 1", "Building 1".

row.getParent(): Row
row.setParent(parent: Row)

Gets / sets the parent row.

row.getRepository(): ActivityRepository
row.setRepository(repo: ActivityRepository)

Gets / sets the repository used by the row to store the activities.

row.getUserObject(): any
row.setUserObject(object: any)

Gets / sets the optional user object. Use it to build a bridge to the business model.

row.getZoneId(): ZoneId
row.setZoneId(zone: ZoneId)
Gets / sets the timezone represented by the row. Each row can be in its own timezone.