JSGantt API

JSGantt  1.2.22

JSGantt API > jsgantt > JSGantt.TaskItem
Search:
 
Filters

Class JSGantt.TaskItem

Creates a task (one row) in gantt object

Constructor

JSGantt.TaskItem ( pID , pName , pStart , pEnd , pColor , pLink , pMile , pRes , pComp , pGroup , pParent , pOpen , pDepend , pCaption )
Parameters:
pID <Number> Task unique numeric ID
pName <String> Task Name
pStart <Date> Task start date/time (not required for pGroup=1 )
pEnd <Date> Task end date/time, you can set the end time to 12:00 to indicate half-day (not required for pGroup=1 )
pColor <String> Task bar RGB value
pLink <String> Task URL, clicking on the task will redirect to this url. Leave empty if you do not with the Task also serve as a link
pMile <Boolean> Determines whether task is a milestone (1=Yes,0=No)
pRes <String> Resource to perform the task
pComp <Number> Percent complete (Number between 0 and 100)
pGroup <Boolean>
pParent <Number> ID of the parent task
pOpen <Boolean>
pDepend <String> Comma seperated list of IDs this task depends on
pCaption <String> Caption to be used instead of default caption (Resource). note : you should use setCaption("Caption") in order to display the caption

Methods

getCaption

String getCaption ( )
Returns task caption (if it exists)
Returns: String

getColor

String getColor ( )
Returns task bar color (i.e. 00FF00)
Returns: String

getCompStr

String getCompStr ( )
Returns task completion percent as formatted string (##%)
Returns: String

getCompVal

Boolean getCompVal ( )
Returns task completion percent as numeric value
Returns: Boolean

getDepend

String getDepend ( )
Returns task dependencies as list of values (i.e. 123,122)
Returns: String

getDuration

String getDuration ( vFormat )
Returns task duration as a fortmatted string based on the current selected format
Parameters:
vFormat <String> selected format (minute,hour,day,week,month)
Returns: String

getEnd

Datetime getEnd ( )
Returns task end date
Returns: Datetime

getEndX

Int getEndX ( )
Returns the X position of the right of the task bar on the graph (right side)
Returns: Int

getEndY

Number getEndY ( )
Returns the Y position of the bottom of the task bar on the graph (right side)
Returns: Number

getGroup

Number getGroup ( )
Returns whether task is a group (1=Yes,0=No)
Returns: Number

getID

Number getID ( )
Returns task ID
Returns: Number

getLevel

Boolean getLevel ( )
Returns task tree level (0,1,2,3...)
Returns: Boolean

getLink

String getLink ( )
Returns task URL (i.e. http://www.jsgantt.com)
Returns: String

getMile

Boolean getMile ( )
Returns whether task is a milestone (1=Yes,0=No)
Returns: Boolean

getName

String getName ( )
Returns task name
Returns: String

getNumKids

Number getNumKids ( )
Returns the number of child tasks
Returns: Number

getOpen

Boolean getOpen ( )
Returns whether task is open (1=Yes,0=No)
Returns: Boolean

getParent

Number getParent ( )
Returns task parent ID
Returns: Number

getResource

String getResource ( )
Returns task resource name as string
Returns: String

getStart

Datetime getStart ( )
Returns task start date
Returns: Datetime

getStartX

Number getStartX ( )
Returns the X position of the left side of the task bar on the graph (right side)
Returns: Number

getStartY

Number getStartY ( )
Returns the Y position of the top of the task bar on the graph (right side)
Returns: Number

getVisible

Boolean getVisible ( )
Returns whether task is visible (1=Yes,0=No)
Returns: Boolean

setCompVal

void setCompVal ( pCompVal )
Set task completion percentage
Parameters:
pCompVal <Number>
Returns: void

setDepend

void setDepend ( pDepend )
Set task dependencies
Parameters:
pDepend <String> A comma delimited list of task IDs the current task depends on.
Returns: void

setEnd

void setEnd ( pEnd )
Set task end date/time
Parameters:
pEnd <Datetime>
Returns: void

setEndX

String setEndX ( pX )
Set a task bar starting position (right)
Parameters:
pX <Number>
Returns: String

setEndY

String setEndY ( pY )
Set a task bar starting position (bottom)
Parameters:
pY <Number>
Returns: String

setLevel

void setLevel ( pLevel )
Set task tree level (0,1,2,3...)
Parameters:
pLevel <Number>
Returns: void

setNumKid

void setNumKid ( pNumKid )
Set Number of children for the task
Parameters:
pNumKid <Number>
Returns: void

setOpen

void setOpen ( pOpen )
Set task open/closed
Parameters:
pOpen <Boolean>
Returns: void

setStart

void setStart ( pStart )
Set task start date/time
Parameters:
pStart <Datetime>
Returns: void

setStartX

void setStartX ( pX )
Set a task bar starting position (left)
Parameters:
pX <Number>
Returns: void

setStartY

String setStartY ( pY )
Set a task bar starting position (top)
Parameters:
pY <Number>
Returns: String

setVisible

void setVisible ( pVisible )
Set task visibility
Parameters:
pVisible <Boolean>
Returns: void


Copyright © 2009 Yahoo! Inc. All rights reserved.