Introduction

Activities represent objects that will be displayed below the timeline in the graphics of the Gantt chart.
Activities can be added to a specific layer on a row by calling row.addActivity(layer: Layer, activity: Activity).

Activity Types

The following table lists all available activity types and their constructors method. Question marks (?) in the constructor describe optional constructor attributes.

Only mutable activity types can be edited interactively by the user. Any activity type that is not mutable can only be used for read-only purposes.

InterfaceBase classDescription & AttributesEditable
Activity
ActivityBase

The simplest form of an activity.

Constructor: new ActivityBase(name?, startTime, endTime)

  • id: string - activity.getId()

  • name: string - activity.getName()

  • startTime: number - activity.getStartTime()

  • endTime: numberactivity.getEndTime()

  • userObject: object - activity.getUserObject() / activity.setUserObject()


ChartActivity
ChartActivityBase

Simple chart activity. Holds a value.

These activities can be displayed in a chart layout.

Constructor: new ChartActivity(chartValue, startTime?, endTime?)

  • id: string activity.getId()

  • name: string - activity.getName()
  • chartValuenumber - activity.getChartValue()

  • startTime: number - activity.getStartTime()

  • endTime: number - activity.getEndTime()

  • userObject: object - activity.getUserObject() / activity.setUserObject()


CompletableActivity
CompletableActivityBase

These activities carry a percentage value (completion). You have to extend this class to describe how the percentage is set.

Constructor: new CompletableActivityBase(name?, startTime?, endTime?)

  • id: string - activity.getId()

  • name: string - activity.getName()

  • percentageValue: numbergetPercentageComplete()
  • startTime: number - activity.getStartTime()

  • endTime: number - activity.getEndTime()

  • userObject: object - activity.getUserObject() / activity.setUserObject()


HighLowChartActivity
HighLowChartActivityBase

Chart activity with a high point and a low point.
These activities can be displayed in a chart layout.

Constructor: new HighLowChartActivityBase(low, high, startTime?, endTime?)

  • id: string activity.getId()

  • name: stringactivity.getName()

  • low: number activity.getLow()

  • high: number activity.getHigh()

  • startTime: number activity.getStartTime()

  • endTime: number - activity.getEndTime()

  • userObject: object - activity.getUserObject() / activity.setUserObject()


MutableActivity
MutableActivityBase

The simplest form of a mutable activity. The user can change the start and end time of these activities.

Constructor: new MutableActivityBase(name, startTime, endTime)

  • id: string - activity.getId()

  • name: string - activity.getName()

  • startTime: number - activity.getStartTime()

  • endTime: numberactivity.getEndTime()

  • userObject: object - activity.getUserObject() / activity.setUserObject()

(tick)

MutableChartActivity
MutableChartActivityBase

These activities can be displayed in a chart layout. The user can change the start and end time and the chart value of these activities.

Constructor: new MutableChartActivityBase(value, startTime?, endTime?)

  • id: string activity.getId()

  • name: string - activity.getName() / activity.setName(string)
  • chartValuenumber - activity.getChartValue() / activity.setChartValue(number)

  • startTime: number activity.getStartTime() / activity.setStartTime(number)
  • endTime: number - activity.getEndTime() / activity.getEndTime(number)
  • userObject: object - activity.getUserObject() / activity.setUserObject(object)

  • duration: number - activity.getDuration() / activity.setDuration(number) / activity.addDuration(number, multiplier?: number)

(tick)

MutableCompletableActivity
MutableCompletableActivityBase

These activities carry a percentage value (completion). The user can change the start and end time and the percentage complete value of these activities.

Constructor: new MutableCompletableActivityBase(value, startTime, endTime)

  • id: string - activity.getId()

  • name: string - activity.getName() / activity.setName(string)

  • percentageValue: numbergetPercentageComplete() / setPercentageComplete(number)
  • startTime: number activity.getStartTime() / activity.setStartTime(number)
  • endTime: number - activity.getEndTime() / activity.getEndTime(number)
  • userObject: object - activity.getUserObject() / activity.setUserObject(object)

  • duration: number - activity.getDuration() /  activity.setDuration(number) / activity.addDuration(number, multiplier?: number)

(tick)

MutableHighLowChartActivity
MutableHighLowChartActivityBase

These activities can be displayed in a chart layout. The user can change the start and end time and the high and low value of these activities.

Constructor: new MutableHighLowChartActivityBase(low, high, startTime?, endTime?)

  • id: string activity.getId()
  • name: stringactivity.getName() / activity.setName(string)
  • low: number activity.getLow() / activity.setLow(number)
  • high: number activity.getHigh() / activity.setHigh(number)
  • startTime: number activity.getStartTime() / activity.setStartTime(number)
  • endTime: number - activity.getEndTime() / activity.getEndTime(number)
  • userObject: object - activity.getUserObject() / activity.setUserObject(object)
  • duration: number - activity.getDuration() /  activity.setDuration(number) / activity.addDuration(number, multiplier?: number)
(tick)