[]
Sheets.GanttSheet.Project
• new Project(name
)
Represents a project for scheduling.
Name | Type | Description |
---|---|---|
name |
string |
Indicates the name of this project. The name will apply to the root task also. |
• calendar: Calendar
Gets or sets the calendar for this project. It is the default calendar for all tasks in this project. Note do not modify the members of calendar, instead, please replace the calendar instance to modify.
• calendarSettings: CalendarSettings
Gets the calendar settings for this project, and configure the parameters used for calculating dates and durations.
readonly
• count: number
Gets the count of tasks and blank rows in this project.
readonly
• currentDate: Date
Gets or sets the current date of this project. Gantt chart will show a grid line to indicate current date.
• dependencies: TaskDependency
[]
Gets the tasks dependencies in this project. This is a cloned array of the internal tasks dependencies. Call addDependency or removeDependency to modify it.
readonly
• finishDate: Date
Gets the finish date of this project. By default, the finish date is scheduled by the start date.
• layout: TaskbarLayout
Gets the layout for gantt chart, and configure the layout appearance of task bars and links.
readonly
• root: Task
Gets the root task of this project.
readonly
• sorted: boolean
Indicates the tasks are sorted.
readonly
• startDate: Date
Gets or sets the start date of this project. The scheduling will start from this date.
• taskStyleRules: Collection
<TaskbarStyleRule
>
Gets the list of task style rules for gantt chart, and configure the appearance for task with the specified rules.
readonly
• tasks: Task
[]
Gets the tasks in this project. This is a cloned array of the internal tasks. Please use getTask if you want to get one task with the specified task number.
readonly
• tasksSorted: Task
[]
Gets the tasks in this project in the sorted order. Specially, null indicates a blank row in the array. This is a cloned array of the internal tasks. Please use getTaskByRow if you want to get one task with the specified row index after sort.
readonly
• timescale: Timescale
Gets the timescale for gantt chart, and configure the timescale appearances and locations.
readonly
▸ addDependency(dependencies
): void
Adds one or more task dependency for the project.
Name | Type | Description |
---|---|---|
dependencies |
ITaskDependency | TaskDependency | TaskDependency [] | ITaskDependency [] |
Indicates the tasks dependencies to be added. |
void
▸ addTasks(data?
, level?
): Task
[]
Adds tasks with the specified count or data for this project.
Name | Type |
---|---|
data? |
number | ITaskData | ITaskData [] |
level? |
number |
Task
[]
Array of the added tasks.
▸ getTask(taskNumber
): Task
Gets a task with the specified task number. Typically, the task number is the index of the task in project. If the tasks has been sorted, please uses getTaskByRow to get task with the specified row index.
Name | Type | Description |
---|---|---|
taskNumber |
number |
Specifies the task number of the target task. |
The task with the specified task number.
▸ indentTasks(taskNumbers
): void
Increases the levels of the specified tasks for this project.
Name | Type | Description |
---|---|---|
taskNumbers |
number | number [] |
A number or number array indicates the number of the tasks to increase levels. |
void
▸ indentTasksByRange(taskNumber
, count?
): void
Increases the levels of a range of tasks with the continues numbers for this project.
Name | Type | Description |
---|---|---|
taskNumber |
number |
A number indicates the first number of the tasks to increase levels. |
count? |
number |
- |
void
▸ insertTasks(taskNumber
, data?
, level?
): Task
[]
Inserts tasks at the specified position with provided data.
Name | Type | Description |
---|---|---|
taskNumber |
number |
Specifies the target task number to insert. |
data? |
number | ITaskData | ITaskData [] |
- |
level? |
number |
- |
Task
[]
Array of the inserted tasks.
▸ outdentTasks(taskNumbers
): void
Decreases the levels of the specified tasks for this project.
Name | Type | Description |
---|---|---|
taskNumbers |
number | number [] |
A number or number array indicates the number of the tasks to decrease levels. |
void
▸ outdentTasksByRange(taskNumber
, count?
): void
Decreases the levels of a range of tasks with the continues numbers for this project.
Name | Type | Description |
---|---|---|
taskNumber |
number |
A number indicates the first number of the tasks to decrease levels. |
count? |
number |
- |
void
▸ removeDependency(dependencies
): void
Removes one or more task dependency for the project.
Name | Type | Description |
---|---|---|
dependencies |
TaskDependency | TaskDependency [] |
Indicates the tasks dependencies to be removed. Note the dependency instance should be members of project.dependencies. |
void
▸ removeTasks(taskNumbers
): void
Removes tasks with the specified task numbers for this project.
Name | Type | Description |
---|---|---|
taskNumbers |
number | number [] |
A number or number array indicates the number of the tasks to be removed. |
void
▸ removeTasksByRange(taskNumber
, count?
): void
Removes a range of tasks with the continues task numbers for this project.
Name | Type | Description |
---|---|---|
taskNumber |
number |
A number indicates the first number of the tasks to be removed. |
count? |
number |
- |
void
▸ resumeSchedule(): void
Resume the scheduling process after made modifications for multiple tasks or dependencies.
void
▸ sort(fields
, ascendingStates?
, keepStructure?
, renumber?
): void
Sorts the tasks with the specified task fields.
Name | Type | Description |
---|---|---|
fields |
string [] |
Specifies the fields to sort by. |
ascendingStates? |
boolean [] |
- |
keepStructure? |
boolean |
- |
renumber? |
boolean |
- |
void
▸ suspendSchedule(): void
Suspends the scheduling process before making modifications for multiple tasks or dependencies.
void