[]
        
(Showing Draft Content)

GC.Spread.Sheets.GanttSheet.Task

Class: Task

Sheets.GanttSheet.Task

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new Task()

Creates a task instance. Internal used only.

classdesc Represents a task in project.

Properties

children

children: Task[]

Gets the children of this task. This is a cloned array of the internal tasks. To modify the children, please call project.insertTasks and project.removeTasks.

readonly


complete

complete: number

Gets or sets a float number that indicates the complete percentage of this task. The value could be 0 to 1.


completeThrough

completeThrough: Date

Gets or sets a Date value that indicates the progress of a task. It is the point up to which actual have been reported for the task.


duration

duration: string | number | Duration

Gets or sets the duration of this task. It is allowed to set a number or string value to represent the duration, and the get result will always be a valid GC.Spread.Sheets.GanttSheet.Duration object. Note that duration could be null for a start-only or finish-only task with manually scheduling mode.


finish

finish: Date

Gets or sets the finish date of this task. Note that finish could be null for a start-only or duration-only task with manually scheduling mode. In these cases, use finishDisplayed to get the actual value in GanttChart.


finishDisplayed

finishDisplayed: Date

Gets the finish date for this task to display in GanttChart.

readonly


isMilestone

isMilestone: boolean

Gets or sets a boolean value that indicates this task is a milestone or not. If not specified, a task will show as milestone if the duration time is 0.


isNormal

isNormal: boolean

Gets a boolean value that indicates this task is a normal task or not. A normal task is neither a summary task nor milestone.

readonly


isSummary

isSummary: boolean

Gets a boolean value that indicates this task is a summary task or not. A summary task is a parent of other tasks.

readonly


level

level: number

Gets the level of this task. For root task, the value is 0.

readonly


mode

mode: TaskScheduleMode

Gets or sets the scheduling mode of this task.


name

name: string

Gets or sets the name of this task.


parent

parent: Task

Gets the parent of this task. Note the root task has no parent.

readonly


predecessorDependencies

predecessorDependencies: TaskDependency[]

Gets a GC.Spread.Sheets.GanttSheet.TaskDependency array that contains all predecessor of this task. To modify the predecessor, please set predecessor field of task, or call addDependency or removeDependency of project.

readonly


predecessors

predecessors: string

Gets or sets a string value that represents the predecessors of this task. The predecessors string contains one or more task number and dependency type.


rowIndex

rowIndex: number

Gets the row index of this task. The row index is same as the id of the task if tasks are not sorted.

readonly


start

start: Date

Gets or sets the start date of this task. Note that start could be null for a finish-only or duration-only task with manually scheduling mode. In these cases, use startDisplayed to get the actual value in GanttChart.


startDisplayed

startDisplayed: Date

Gets the start date for this task to display in GanttChart.

readonly


style

style: Object

Gets or sets the bar styles of this task. A task could have several task bars in the GanttChart, you could set style for each bar by the specified rule name. Note do not modify the members of this value, instead, please set a new object instance for this field.

Index signature

▪ [key: string]: TaskStyle


successorDependencies

successorDependencies: TaskDependency[]

Gets a GC.Spread.Sheets.GanttSheet.TaskDependency array that contains all successors of this task. To modify the successors, please set successors field of task, or call addDependency or removeDependency of project.

readonly


successors

successors: string

Gets or sets a string value that represents the successors of this task. The successors string contains one or more task number and dependency type.


taskNumber

taskNumber: number

Gets the number of this task. For root task, the value is 0.

readonly

Methods

getValue

getValue(property): void

Gets the task value by the specified property.

Parameters

Name Type Description
property string the specified property.

Returns

void

the task value.


setValue

setValue(property, value): void

Sets the task value by the specified property.

Parameters

Name Type Description
property string the specified property.
value any the specified value.

Returns

void