JSGantt API

JSGantt  1.2.22

JSGantt API > jsgantt > JSGantt.GanttChart
Search:
 
Filters

Class JSGantt.GanttChart

Creates the gant chart. for example:

var g = new JSGantt.GanttChart('g',document.getElementById('GanttChartDIV'), 'day');

var g = new JSGantt.GanttChart( - assign the gantt chart to a javascript variable called 'g' 'g' - the name of the variable that was just assigned (will be used later so that gantt object can reference itself) document.getElementById('GanttChartDIV') - reference to the DIV that will hold the gantt chart 'day' - default format will be by day

Methods

AddTaskItem

Void AddTaskItem ( )
Adds a TaskItem to the Gantt object task list array
Returns: Void

CalcTaskXY

Void CalcTaskXY ( )
Calculates X/Y coordinates of a task and sets the Start and End properties of the TaskItem
Returns: Void

clearDependencies

Void clearDependencies ( )
Clears dependency lines between tasks
Returns: Void

dLine

Void dLine ( )
Draw a diaganol line (calc line x,y pairs and draw multiple one-by-one sLines)
Returns: Void

Draw

Void Draw ( )
Draw gantt chart
Returns: Void

DrawDependencies

Void DrawDependencies ( )
Draw all task dependencies
Returns: Void

drawDependency

Void drawDependency ( )
Draw dependency line between two points (task 1 end -> task 2 start)
Returns: Void

getArrayLocationByID

Void getArrayLocationByID ( )
Find location of TaskItem based on the task ID
Returns: Void

getCaptionType

String getCaptionType ( )
Returns current gantt caption type
Returns: String

getDateDisplayFormat

String getDateDisplayFormat ( )
Returns current display format
Returns: String

getDateInputFormat

String getDateInputFormat ( )
Returns date input format
Returns: String

getList

Array getList ( )
Returns task list Array
Returns: Array

getShowComp

Number getShowComp ( )
Returns whether percent complete column is shown
Returns: Number

getShowDur

Number getShowDur ( )
Returns whether duration column is shown
Returns: Number

getShowEndDate

Number getShowEndDate ( )
Returns whether end date column is shown
Returns: Number

getShowRes

Number getShowRes ( )
Returns whether resource column is shown
Returns: Number

getShowStartDate

Number getShowStartDate ( )
Returns whether start date column is shown
Returns: Number

mouseOut

Void mouseOut ( )
Mouseout behaviour for gantt row
Returns: Void

mouseOver

Void mouseOver ( )
Mouseover behaviour for gantt row
Returns: Void

setCaptionType

void setCaptionType ( pType )
Set gantt caption
Parameters:
pType <String>

Caption-Displays a custom caption set in TaskItem
Resource-Displays task resource
Duration-Displays task duration
Complete-Displays task percent complete

Returns: void

setDateDisplayFormat

void setDateDisplayFormat ( pShow )
Overall date display format
Parameters:
pShow <String> (mm/dd/yyyy,dd/mm/yyyy,yyyy-mm-dd)
Returns: void

setDateInputFormat

void setDateInputFormat ( pShow )
Overall date input format
Parameters:
pShow <String> (mm/dd/yyyy,dd/mm/yyyy,yyyy-mm-dd)
Returns: void

setFormat

void setFormat ( pFormat )
Set current display format and redraw gantt chart (minute/hour/day/week/month/quarter)
Parameters:
pFormat <String> (mm/dd/yyyy,dd/mm/yyyy,yyyy-mm-dd)
Returns: void

setShowComp

void setShowComp ( pShow )
Show/Hide completed column
Parameters:
pShow <Number> 1=Show,0=Hide
Returns: void

setShowDur

void setShowDur ( pShow )
Show/Hide duration column
Parameters:
pShow <Number> 1=Show,0=Hide
Returns: void

setShowEndDate

void setShowEndDate ( pShow )
Show/Hide end date column
Parameters:
pShow <Number> 1=Show,0=Hide
Returns: void

setShowRes

void setShowRes ( pShow )
Show/Hide resource column
Parameters:
pShow <Number> 1=Show,0=Hide
Returns: void

setShowStartDate

void setShowStartDate ( pShow )
Show/Hide start date column
Parameters:
pShow <Number> 1=Show,0=Hide
Returns: void

sLine

Void sLine ( )
Draw a straight line (colored one-pixel wide DIV), need to parameterize doc item
Returns: Void


Copyright © 2009 Yahoo! Inc. All rights reserved.