Interface GanttStatic

Index

Properties

Methods

Properties

public $click: any

public config: GanttConfigOptions

public date: GanttDateHelpers

public keys: GanttHotkeys

public locale: GanttLocale

public skin: String

public templates: GanttTemplates

public version: String

Methods

public addLink(link: any): any

adds a new dependency link

Parameters

  • link: any

    the link object

Returns

any

public addTask(task: any, parent: string): any

adds a new task

Parameters

  • task: any

    the task object

  • parent: string

    the parent's id

Returns

any

public attachEvent(name: string, handler: (...args: any[]) => any): any

attaches the handler to an inner event of dhtmlxGantt

Parameters

  • name: string

    the event's name, case-insensitive

  • handler: (...args: any[]) => any

    the handler function

Returns

any

public callEvent(name: string, params: any): boolean

calls an inner event

Parameters

  • name: string

    the event's name, case-insensitive

  • params: any

    an array of the event-related data

Returns

boolean

public changeLinkId(id: any, new_id: any): any

changes the link's id

Parameters

  • id: any

    the current link's id

  • new_id: any

    the new link's id

Returns

any

public changeTaskId(id: any, new_id: any): any

changes the task's id

Parameters

  • id: any

    the current task's id

  • new_id: any

    the new task's id

Returns

any

public checkEvent(name: string): boolean

checks whether an event has some handler(s) specified

Parameters

  • name: string

    the event's name

Returns

boolean

public clearAll(): any

removes all tasks from the Gantt chart

Returns

any

public close(id: any): any

closes the branch with the specified id

Parameters

  • id: any

    the branch id

Returns

any

public deleteLink(id: any): any

deletes the specified dependency link

Parameters

  • id: any

    the dependency link's id

Returns

any

public deleteTask(id: string): any

deletes the specified task

Parameters

  • id: string

    the task's id

Returns

any

public detachAllEvents(): any

detaches all handlers from events (which were attached before by the attachEvent() method)

Returns

any

public detachEvent(id: string): any

detaches a handler from an event (which was attached before by the attachEvent() method)

Parameters

  • id: string

    the event's id

Returns

any

public eachTask(code: (...args: any[]) => any, parent?: any, master?: any): any

iterates over specified tasks of the Gantt chart

Parameters

  • code: (...args: any[]) => any

    a function that will iterate over tasks. Takes a task object as a parameter

  • parent?: any optional

    the parent id. If specified, the function will iterate over childs of the
    specified parent

  • master?: any optional

    the object, that 'this' will refer to

Returns

any

public getChildren(id: any): any

returns the 1st-level child tasks of the specified parent branch

Parameters

  • id: any

    the parent branch's id

Returns

any

public getGlobalTaskIndex(id: any): any

get the index of a task in the tree

Parameters

  • id: any

    the task id

Returns

any

public getLabel(property: string, key: any): any

gets the label of a select control in the lightbox

Parameters

  • property: string

    the name of a data property that the control is mapped to

  • key: any

    the option's id. This parameter is compared with the task's data property to
    assign the select's option to the task

Returns

any

public getLightbox(): HTMLElement

gets the lightbox's HTML object element

Returns

HTMLElement

public getLightboxSection(name: string): any

returns the object of the lightbox's section

Parameters

  • name: string

    the name of the section

Returns

any

public getLightboxValues(): any

returns values of the lightbox's sections

Returns

any

public getLink(id: any): any

returns the dependency link object by the specified id

Parameters

  • id: any

    the link id

Returns

any

public getLinkNode(id: any): HTMLElement

returns the HTML element of the specified dependency link

Parameters

  • id: any

    the link id

Returns

HTMLElement

public getNext(id: any): any

returns the id of the next item (no matter what the level of nesting is: the same or different)

Parameters

  • id: any

    the task id

Returns

any

public getPrev(id: any): any

returns the id of the previous item (no matter what the level of nesting is: the same or different)

Parameters

  • id: any

    the task id

Returns

any

public getScrollState(): any

returns the scroll position

Returns

any

public getSelectedId(): any

returns the id of the selected task

Returns

any

public getState(): any

gets the current state of the Gantt chart

Returns

any

public getTask(id: any): any

returns the task object

Parameters

  • id: any

    the task id

Returns

any

public getTaskByTime(from?: Date, to?: Date): any

returns a collection of tasks which occur during the specified period

Parameters

  • from?: Date optional

    the start date of the period

  • to?: Date optional

    the end date of the period

Returns

any

public getTaskIndex(id: any): number

get the index of a task in the branch

Parameters

  • id: any

    the task id

Returns

number

public getTaskNode(id: any): HTMLElement

returns the HTML element of the task bar

Parameters

  • id: any

    the task id

Returns

HTMLElement

public getTaskRowNode(id: any): HTMLElement

returns the HTML element of the task row in the table

Parameters

  • id: any

    the task id

Returns

HTMLElement

public hasChild(id: any): boolean

checks whether the specified item has child tasks

Parameters

  • id: any

    the task id

Returns

boolean

public hideCover(box?: HTMLElement): any

hides the lightbox modal overlay that blocks interactions with the remaining screen

Parameters

  • box?: HTMLElement optional

    an element to hide

Returns

any

public hideLightbox(): any

closes the lightbox if it's currently active

Returns

any

public hideQuickInfo(): any

hides the pop-up task form (if it's currently active)

Returns

any

public init(container: any, from?: Date, to?: Date): any

constructor. Initializes a dhtmlxGantt object

Parameters

  • container: any

    an HTML container ( or its id) where a dhtmlxGantt object will be initialized

  • from?: Date optional

    the start value of the time scale (X–Axis)

  • to?: Date optional

    the end value of the time scale (X–Axis)

Returns

any

public isLinkAllowed(link: any): boolean

checks whether the specified link is correct

Parameters

  • link: any

    the link object

Returns

boolean

public isLinkExists(id: any): boolean

checks whether the specified link exists

Parameters

  • id: any

    the link id

Returns

boolean

public isTaskExists(id: any): boolean

checks whether the specified task exists

Parameters

  • id: any

    the task id

Returns

boolean

public isTaskVisible(id: any): boolean

checks whether the specifies task is currently rendered in the Gantt chart

Parameters

  • id: any

    the task's id

Returns

boolean

public load(url: string, type?: string, callback?: (...args: any[]) => any): any

loads data to the gantt from an external data source

Parameters

  • url: string

    the server-side url (may be a static file or a server side script that outputs data)

  • type?: string optional

    ('json', 'xml', 'oldxml') the data type. The default value - 'json'

  • callback?: (...args: any[]) => any optional

    the callback function

Returns

any

public locate(e: Event): string

gets the id of a task from the specified HTML event

Parameters

  • e: Event

    a native event

Returns

string

public moveTask(sid: any, tindex: number, parent?: any): any

moves a task to a new position

Parameters

  • sid: any

    the id of the task to move

  • tindex: number

    the index of the position that the task will be moved to
    (the index in the whole tree)

  • parent?: any optional

    the parent id. If specified, the tindex will refer to the index in the
    'parent' branch

Returns

any

public open(id: any): any

opens the branch with the specified id

Parameters

  • id: any

    the branch id

Returns

any

public parse(url: any, type?: string): any

loads data from a client-side resource

Parameters

  • url: any

    a string or object which represents data

  • type?: string optional

    ( 'json', 'xml' ) the data type. The default value - 'json'

Returns

any

public refreshData(): any

refreshes data in the Gantt chart

Returns

any

public refreshLink(id: any): any

refreshes the specifies link

Parameters

  • id: any

    the link id

Returns

any

public refreshTask(id: any): any

refreshes the task and its related links

Parameters

  • id: any

    the task id

Returns

any

public render(): any

renders the whole Gantt chart

Returns

any

public resetLightbox(): any

removes the current lightbox's HTML object element

Returns

any

public resizeLightbox(): any

forces the lightbox to resize

Returns

any

public scrollTo(x: number, y: number): any

scrolls the Gantt container to the specified position

Parameters

  • x: number

    the value of the horizontal scroll

  • y: number

    the value of the vertical scroll

Returns

any

public selectTask(id: any): any

selects the specified task

Parameters

  • id: any

    the task id

Returns

any

public serialize(type?: string): any

serializes the data into JSON or XML format.

Parameters

  • type?: string optional

    the format that the data will be serialized into.
    Possible values: 'json' (default ), 'xml'.

Returns

any

public serverList(list_name: string, options?: any): any

returns a list of options

Parameters

  • list_name: string

    the name of a list

  • options?: any optional

    an array of options

Returns

any

public setSizes(): any

resizes the Gantt chart

Returns

any

public showCover(box?: HTMLElement): any

shows the lightbox modal overlay that blocks interactions with the remaining screen

Parameters

  • box?: HTMLElement optional

    an element to hide

Returns

any

public showLightbox(id: any): any

opens the lightbox for the specified task

Parameters

  • id: any

    the task id

Returns

any

public showQuickInfo(id: any): any

displays the pop-up task form for the specified task

Parameters

  • id: any

    the task id

Returns

any

public showTask(id: any): any

makes the specified task visible on the screen

Parameters

  • id: any

    the task id

Returns

any

public sort(field: any, desc?: boolean, parent?: any): any

sorts the tasks in the grid

Parameters

  • field: any

    the name of the column that the grid will be sorted by or a custom
    sorting function

  • desc?: boolean optional

    specifies the sorting direction: true - descending sort and false - ascending
    sort. By default, false

  • parent?: any optional

    the id of the parent task. Specify the parameter if you want to sort tasks only in
    the branch of the specified parent.

Returns

any

public unselectTask(): any

removes selection from the selected task

Returns

any

public updateLink(id: string): any

updates the specified dependency link

Parameters

  • id: string

    the task id

Returns

any

public updateTask(id: string): any

updates the specified task

Parameters

  • id: string

    the task id

Returns

any