Created by Thomas Zimmermann, last modified on Nov 19, 2021
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.
Interface | Base class | Description & Attributes | Editable |
---|
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: number - activity.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()
chartValue: number - 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: number - getPercentageComplete()
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: string - activity.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: number - activity.getEndTime() userObject: object - activity.getUserObject() / activity.setUserObject()
| |
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)
chartValue: number - 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)
| |
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: number - getPercentageComplete() / 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)
| |
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: string - activity.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)
| |