We have two types of objects:
design-time objects (
GanttProjectInfo,
GanttTaskInfo). They are just data stubs and are used while designing the initial content of the chart before the create() method.
-
-
attachEvent add custom event handlers of different types
create creates GanttChart on page
getMonthScaleLabel returns a string representation of current month for the month scale row; you may override this function to customize the label
-
setEditable defines whether GanttChart is editable by user
-
-
-
-
showContextMenu enables or disables default context menu in tree, which can be used for basic task manipulations
showDescProject enables or disables inline project description (displayed right after the project bar), and configures the shown values
showDescTask enables or disables inline task description (displayed right after the task bar), and configures the shown values
showNewProject show/hide new project bar at start-up; it is useful if you have no project at all, and user needs some start point where the menu is attached
showTooltip show/hide task & project tooltip (info panel)
-
-
-
-
getPrintableHTML returns chart in html format suitable for printing, full-sized and without scrollbars
-
getXML returns
XML string representation of the chart content
insertProject inserts new project with specified id, name, start date and returns it
loadData loads
XML data from string or file
printToWindow opens chart full-sized in a new window, from where you can print it as you like
saveData saves
XML data to server using
URL specified in
setSavePath and encoding “application/x-www-form-urlencoded”
-
-
isProject this is object property, equals true; used to distinguish Project and Task in menu event handler
-
getDuration calculates and returns the duration of project in hours
getId returns id of project
-
-
-
-
insertTask inserts new task with specified id, name, start date, duration, percent completed, predecessor task Id, parent task Id and returns it
-
-
isTask this is object property, equals true; used to distinguish Project and Task in menu event handler
-
getEST returns estimated start date of task
-
-
-
-
-
-
-
setEST sets start date of this task
-
-
setPredecessor creates a connection line between this task and predecessor with specified Id