|
adjustToNonworkingTime
|
boolean
|
|
Determines whether nonworkingDays/nonworkingHours are taken into considuration when determining the dateEnd of the tasks. When this property is enabled the dateEnd of the tasks is calculated to include only the actual working time. By default it's disabled and only calendar time is used.
Code example:
$('#myGantt').jqxGantt({adjustToNonworkingTime: true});
|
autoSchedule
|
boolean
|
|
Recalculates the tasks that are connected and re-schedules them according to their connections. If no connections are present, autoScheduling has no effect until a connection is created. Connection types determines the start/end date limits of the tasks.
Code example:
$('#myGantt').jqxGantt({autoSchedule: true});
|
autoScheduleStrictMode
|
boolean
|
|
Affects the tasks only when autoSchedule is enabled. When set to true, the tasks are strictly scheduled ( according to their connections ) and dragging is not allowed. Users can set lag to specific connections to determine a delay of overlap of between the two tasks ( interval of time in miliseconds ). Lag one of the attributes of a task connection and should be set in the dataSource where the task connections are defined.
Code example:
$('#myGantt').jqxGantt({autoScheduleStrictMode: true});
|
autoScrollStep
|
number
|
|
Determines the scroll speed when dragging when autoScroll property is set.
Code example:
$('#myGantt').jqxGantt({autoScrollStep: 10});
|
columnMenu
|
boolean
|
|
Enabled/Disables the colummn header menu. When enabled and the user hovers a column header, a drop down button will appear that triggers a column menu for quick actions like sorting, filtering, etc. The actions depend on the enabled Gantt features, for example the filtering action will be available only if filtering is enabled for the element.
Code example:
$('#myGantt').jqxGantt({columnMenu: true});
|
columnMinWidth
|
string | number
|
|
Sets or gets the column's min width.
Code example:
$('#myGantt').jqxGantt({columnMinWidth: 100px});
|
columnResize
|
boolean
|
|
Determines whether the Table columns are resizable or not. When enabled it is possible to resize the columns from the header cells of the Table in both Task and Resource timelines.
Code example:
$('#myGantt').jqxGantt({columnResize: true});
|
columnResizeFeedback
|
boolean
|
|
Determines resize feedback is used during column resizing. This property is applicable only when columnResize is enabled.
Code example:
$('#myGantt').jqxGantt({columnResizeFeedback: true});
|
currentTime
|
string | Date
|
|
Gantt's current time. By default it is the today's date.
|
currentTimeIndicator
|
boolean
|
|
Enables/Disables the current time indicator. Current time indicator shows the current time in the appropriate view cells.
Code example:
$('#myGantt').jqxGantt({currentTimeIndicator: true});
|
currentTimeIndicatorInterval
|
number
|
|
Determines the refresh interval in seconds for the currentTimeIndicator.
Code example:
$('#myGantt').jqxGantt({currentTimeIndicatorInterval: 60});
|
dataExportFileName
|
string
|
|
|
source
|
any
|
|
Determines the tasks that will be loaded inside the Timeline. Each item represents an object that should contain the following properties: - label - the label of the Task
- dateStart - the starting date of the Task. Should be a string representing a valid date.
- dateEnd - the ending date of the Task. Should be a string representing a valid date.
- type - determines the type of the task. Whether it's a simple task, a project or a milestone. Each type of task has specific behavior and additional attributes.
. Additional properties: - connections - an array of objects representing the connection between two tasks. Each connection (object) should have the following properties :
- target - a number representing the index of the target task
- type - a number representing the type of the connection. Four types of connections are available:
- 0 - is a connection of type Start-to-Start
- 1 - is a connection of type End-to-Start
- 2 - is a connection of type End-to-End
- 3 - is a connection of type Start-to-End
- lag - a number that determines the delay between two connected auto scheduled tasks. Lag property can be a positive or a negative number. When negative it determines the overlap between two connected tasks. This property is used in conjuction with autoSchedule.
- duration - determines the duration of a Task in days, hours, minutes, seconds or miliseconds. Very usefull when the the dateEnd of a Task is unknown. The duration always shows the calendar time whether it is in days/hours or other.
- minDuration - sets the minimum duration of a task.
- maxDuration - sets the maximum duration of a task.
- minDateStart - determines the mininum date that a task can start from. Must be if type string and should represent a valid date.
- maxDateStart - determines the maximum date that a task can start from. Must be if type string and should represent a valid date.
- minDateEnd - determines the mininum date that a task can end. Must be if type string and should represent a valid date.
- maxDateEnd - determines the maximum date that a task can end. Must be if type string and should represent a valid date.
- progress - a number that determines the progress of a task ( from 0 to 100 ).
- overdue - a boolean that indicates whether the task's dateEnd has surpassed it's deadline date.
- disableDrag - a boolean property that disables the dragging of a task when set to true.
- disableResize - a boolean property that disables the resizing of a task when set to true.
- dragProject - a boolean that determines whether or not the whole project (along with the tasks) can be dragged while dragging the project task. Applicalbe only to Projects.
- segments - an array of objects that allows to devide a task into multiple segements. Each segment (except the first) can have a different starting date, duration and label.
- synchronized - a boolean that if set the project task's start/end dates are automatically calculated based on the tasks. By default a synchronized project task can't be dragged alone. Applicable only to Project tasks.
- expanded - a boolean that determines if a project is expanded or not. If not all of it's sub-tasks are not visible. Only the project task itself is visible. By default no projects are expanded. Applicable only to project tasks..
GanttChart also accepts a DataAdapter instance as dataSource.
Code example:
$('#myGantt').jqxGantt({source: [{ label: 'Task 3', dateStart: '2023-02-05', dateEnd: '2023-07-08', progress: 50, type: 'task' }]});
|
dayFormat
|
string
|
|
Determines the format of the dates in the timeline header when they represent days.
Code example:
$('#myGantt').jqxGantt({dayFormat: short});
|
dateEnd
|
string | Date
|
|
Determines a specific end date for the Timeline. Usefull when the user wants custom ending date for the Timeline. If no date is set the end date of the timeline is automatically determined from the tasks.
Code example:
$('#myGantt').jqxGantt({dateEnd: new Date(2050,0,1)});
|
dateStart
|
string | Date
|
|
Determines a specific starting date for the Timeline. Usefull when the user wants custom starting date for the Timeline. If no date is set the start date of the timeline is automatically determined from the tasks.
Code example:
$('#myGantt').jqxGantt({dateStart: new Date(2050,0,1)});
|
dateMarkers
|
{label?: string, date: Date | string, className?: string }[]
|
|
Determines the date markers that will be displayed inside the timeline. Date markers allow to mark and even label specific dates (including time) inside the GanttChart timeline.
|
disabled
|
boolean
|
|
Enables or disables the element.
Code example:
$('#myGantt').jqxGantt({disabled: true});
|
disableAutoScroll
|
boolean
|
|
Disables auto scrolling while dragging/resizing a task bar inside the Timeline.
Code example:
$('#myGantt').jqxGantt({disableAutoScroll: true});
|
disableTaskDrag
|
boolean
|
|
Disables dragging of tasks in the Timeline.
Code example:
$('#myGantt').jqxGantt({disableTaskDrag: true});
|
disableTaskProgressChange
|
boolean
|
|
Disables task progress changing in the Timeline.
Code example:
$('#myGantt').jqxGantt({disableTaskProgressChange: true});
|
disableTaskResize
|
boolean
|
|
Disables resizing of tasks in the Timeline.
Code example:
$('#myGantt').jqxGantt({disableTaskResize: true});
|
disableSelection
|
boolean
|
|
Disables the selection inside the GanttChart.
Code example:
$('#myGantt').jqxGantt({disableSelection: true});
|
disableSegmentDrag
|
boolean
|
|
Disables the task segment dragging.
Code example:
$('#myGantt').jqxGantt({disableSegmentDrag: true});
|
disableSegmentResize
|
boolean
|
|
Disables the task segment resizing.
Code example:
$('#myGantt').jqxGantt({disableSegmentResize: true});
|
disableWindowEditor
|
boolean
|
|
Disables the window editor for the GanttChart.
Code example:
$('#myGantt').jqxGantt({disableWindowEditor: true});
|
durationUnit
|
string
|
|
Determines in what unit is task duration property measured.
Code example:
$('#myGantt').jqxGantt({durationUnit: day});
|
filterRow
|
boolean
|
|
Determines whether a dedicated filter row is used for Table filtering instead of the default filter input. This property has no effect if filtering is not enabled.
Code example:
$('#myGantt').jqxGantt({filterRow: true});
|
firstDayOfWeek
|
number
|
|
Determines the view start day. Sunday is 0, Monday is 1, Saturday is 6. By default it's Sunday.
Code example:
$('#myGantt').jqxGantt({firstDayOfWeek: 1});
|
groupByResources
|
boolean
|
|
Groups the tasks inside the Task timeline according to the resources they are assigned to. Unassigned tasks are placed in a default group labeled 'Unassigned'.
Code example:
$('#myGantt').jqxGantt({groupByResources: true});
|
headerTemplate
|
any
|
|
Allows to create a custom header content for the Task Panel. The attribute accepts an HTMLTemplate element, it's id or a function.
Code example:
$('#myGantt').jqxGantt({headerTemplate: template});
|
hideDateMarkers
|
boolean
|
|
Determines whether the dateMarkers are visible or not.
Code example:
$('#myGantt').jqxGantt({hideDateMarkers: true});
|
hideTimelineHeader
|
boolean
|
|
By default the Timeline has a three level header - timeline details, timeline second details and timeline header. This property hides the header container( the bottom container ).
Code example:
$('#myGantt').jqxGantt({hideTimelineHeader: true});
|
hideTimelineHeaderDetails
|
boolean
|
|
By default the Timeline has a three level header - timeline details, timeline second details and timeline header. This property hides the header details container( the top container ).
Code example:
$('#myGantt').jqxGantt({hideTimelineHeaderDetails: true});
|
hideTimelineSecondHeaderDetails
|
boolean
|
|
By default the Timeline has a three level header - timeline details and timeline header. This property hides the second header details container( the middle container ).
Code example:
$('#myGantt').jqxGantt({hideTimelineSecondHeaderDetails: true});
|
hideResourcePanel
|
boolean
|
|
Hides the Resource panel regardless of the resources availability By default the Resource panel is visible if resources are added to the GanttChart. This property allows to hide the Resource panel permanently.
Code example:
$('#myGantt').jqxGantt({hideResourcePanel: true});
|
horizontalScrollBarVisibility
|
string
|
|
Determines weather or not horizontal scrollbar is shown.
Code example:
$('#myGantt').jqxGantt({horizontalScrollBarVisibility: hidden});
|
hourFormat
|
string
|
|
Determines the format of the dates inside the timeline header when they represent hours.
Code example:
$('#myGantt').jqxGantt({hourFormat: numeric});
|
infiniteTimeline
|
boolean
|
|
When enabled, scrolling to the end of the horizotal timeline, triggers the creation of additional to extend the time range. The number of cells to be added when the scrollbar reaches the end position is determined by the infiniteTimelineStep.
|
infiniteTimelineStep
|
number
|
|
Determines the number of cells to be added when the horizontal scroll bar of the Timeline reaches it's end position when infiniteTimeline is enabled.
|
inverted
|
boolean
|
|
When set the Timeline is positioned on the left side while the Task Tree is positioned on the right. By default it's vice versa.
|
keyboardNavigation
|
boolean
|
|
Determines whether keyboard navigation inside the Table is enabled or not. Keyboard navigation affects both Task and Resource Tables. It allows to navigate between items. the following keyboard shortcut keys are available for focused tasks inside the Task Table: - Enter - opens the Window editor to edit the currently focused task.
- Delete - opens a confirmation window regarding the deletion of the currently focused task.
|
max
|
string | Date
|
|
Detetmines the maximum possible date of the Timeline.
Code example:
$('#myGantt').jqxGantt({max: 2023-1-1});
|
min
|
string | Date
|
|
Detetmines the minimum possible date of the Timeline.
Code example:
$('#myGantt').jqxGantt({min: 2000-1-1});
|
monthFormat
|
string
|
|
Determines the format of the dates the timeline header when they represent months.
Code example:
$('#myGantt').jqxGantt({monthFormat: numeric});
|
monthScale
|
string
|
|
Determines the scale in Month view.
Code example:
$('#myGantt').jqxGantt({monthScale: week});
|
nonworkingDays
|
number[]
|
|
Determines the nonworking days of the week from 0 to 6, where 0 is the first day of the week and 6 is the last day. Nonworking days will be displayed with colored cells inside the timeline and will not affect the dateEnd of the tasks unless the adjustToNonworkingTime property is enabled.
Code example:
$('#myGantt').jqxGantt({nonworkingDays: [0,1]});
|
nonworkingHours
|
number[] | number[][]
|
|
Determines the nonworking hours of a day. Hours are represented as numbers inside an array (e.g. [1,2,3] - means 1,2 and 3 AM) or number ranges represented as nested arrays(e.g. [[0,6]] - means from 0 to 6 AM). In the timline the cells that represent nonworking days are colored differently from the rest and will not affect the dateEnd of the tasks unless the adjustToNonworkingTime property is enabled.
Code example:
$('#myGantt').jqxGantt({nonworkingDays: [22, 23, [0, 6]]});
|
onTaskRender
|
any
|
|
A function that can be used to completly customize the task element. The function has five arguments: - task - the task object.
- segment - the task current segment object. If the task has only one segment, the task object is passed again.
- taskElement - the task's html element.
- segmentElement - the task's segment html element.
- labelElement - the task's segment label html element.
|
popupWindowCustomizationFunction
|
any
|
|
A function that can be used to completly customize the popup Window that is used to interact width tasks by changing their properties. The function as three arguments: - target - the target popup Window that is about to be opened.
- type - the type of the window. The type determines the purpose of the window. Three possible values: 'task' (task editing), 'confirm' ( confirmation window), 'connection' (used when deleting a connection between tasks).
- item - the connection/task object that is the target of the window.
|
popupWindowTabs
|
string[]
|
|
Determines which Tab items are visible inside the popup window. Three possible values are allowed: - general - the general tab with task properties determines by the taskColumns property.
- dependency - the dependency tab which shows the connections to the task and allows to create/delete connections.
- segments - the segments tab which shows the segments of the task and allows to created/delete segments.
.
|
progressLabelFormatFunction
|
any
|
|
A format function for the Timeline task progress label. The expected result from the function is a string. The label is hidden by default can be shown with the showProgressLabel property.
|
quarterFormat
|
string
|
|
Determines the format of the dates the timeline header when they represent quarters.
Code example:
$('#myGantt').jqxGantt({quarterFormat: long});
|
resources
|
{label: string, capacity: number, value: string, workload: number, progress: number, id: string, class: string }[]
|
|
A getter that returns a flat structure as an array of all resources inside the element.
Code example:
$('#myGantt').jqxGantt({});
|
resourceColumns
|
{label: string, value: string}[]
|
|
Deteremines the columns that will be visible in the Resource Tree. Each entry in the value of this property must be of type Object. It should contain the label and value keys. The value of label determines the column header label inside the Task Tree. The value of value determines the content of the cells in the column. By default, one column with all resource labels is visible. Additional properties: - formatFunction - a function that allows to customize the content of each record in the column. The function accepts two arguments - the actual label as string that is going to be inserted and the index of the resource. The function must return a string as the new content.
- min - controls the min size of the column
- max - controls the max size of the column
- size - controls the actual size of the column
Code example:
$('#myGantt').jqxGantt({resourceColumns: { "label": "Task Name", "value": "label" }});
|
resourceFiltering
|
boolean
|
|
Determines whether the Resource Table is filterable or not.
Code example:
$('#myGantt').jqxGantt({resourceFiltering: true});
|
resourceGroupFormatFunction
|
any
|
|
A format function that allows to re-format the group row labels when groupByResources is enabled.
|
resourcePanelHeaderTemplate
|
any
|
|
Allows to create a custom header content for the Resource Panel. The attribute accepts an HTMLTemplate element, it's id or a function.
|
resourcePanelMin
|
number | string
|
|
Determines the min size of the Resource Panel.
|
resourcePanelSize
|
number | string
|
|
Determines the size of the Resource Panel.
|
resourcePanelRefreshRate
|
number
|
|
Determines the refresh rate of the Resource Panel when dragging/resizing/progress changing a Task from the Timeline. This property allows to customize the interval between resource Tree/Timeline refreshes. By default they refresh immediately after a change.
|
resourceTimelineFormatFunction
|
any
|
|
A callback that can be used to customize the content of the resource Timeline cells. The callback accepts three arguments: - taskIndexes - an array of task indexes that are assigned to the resource for the current cell.
- resourceIndex - the index of the resource.
- cellDate - the date of the current cell.
This property is used when resourceTimelineView is set to custom. Depending on the resourceTimelineMode, it should return: - string - when the resourceTimelineMode is set to 'diagram'.
- object - when the resourceTimelineMode is set to 'histogram'. The object should have two attributes: capacity and maxCapacity, in order to be visualized as a histogram.
. Another usage of this callback is to customize the timeline resource representation completely if resourceTimelineMode is set to custom.
|
resourceTimelineMode
|
string
|
|
Determines how the capacity of the resources will be visualized inside the resource timeline. By default, the capacity is measured in hours depending on the view property of the element.
Code example:
$('#myGantt').jqxGantt({resourceTimelineMode: diagram});
|
resourceTimelineView
|
string
|
|
Determines how the resources will be displayed inside the resource Timeline.
|
rightToLeft
|
boolean
|
|
Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
|
selectedTaskIds
|
number[] | string[]
|
|
Sets which tasks to select by their id or gets the currently selected task ids. If no id is provided for the task, an internal id is generated for each task according to it's index(tree path).
Code example:
$('#myGantt').jqxGantt({selectedTaskIds: ['2']});
|
selectedResourceIds
|
number[] | string[]
|
|
Sets which resources to select by their id or gets the currently selected resource ids. If no id is provided for the resource, an internal id is generated for each resource according to it's index(tree path).
Code example:
$('#myGantt').jqxGantt({selectedResourceIds: ['2']});
|
shadeUntilCurrentTime
|
boolean
|
|
Enables/Disables the current time shader. If enabled all cells that represent past time will be shaded.
|
showSelectionColumn
|
boolean
|
|
Shows the selection column of the Task/Resource Table. When applied a checkbox column is displayed that allows to select tasks/resources.
|
showBaseline
|
boolean
|
|
Determines whether the baselnes of the tasks are visible or not. Baselines are defined via the 'planned' attribute on the task objects of the dataSource property.
|
showProgressLabel
|
boolean
|
|
Shows the progress label inside the progress bars of the Timeline tasks.
|
snapToNearest
|
boolean
|
|
If set the dateStart/dateEnd of the tasks will be coerced to the nearest timeline cell date ( according to the view ). Affects the dragging operation as well.
|
sortFunction
|
{ (dataSource: any, sortColumns: string[], directions: string[], defaultCompareFunctions: { (firstRecord: any, secondRecord: any): number }[]): void }
|
|
Allows to set a custom sorting function to be executed when a column is sorted. Can be used to override the default sorting behavior. The function contains the following parameters: - dataSource - the Table's data source
- sortColumns - an array of the data fields of columns to be sorted by
- directions - an array of sort directions to be sorted by (corresponding to sortColumns)
- defaultCompareFunctions - an array of default compare functions to be sorted by (corresponding to sortColumns), useful if the sorting of some columns does not have to be overridden
.
|
sortMode
|
string
|
|
Determines whether the GanttChart can be sorted by one, more then one or no columns.
Code example:
$('#myGantt').jqxGantt({sortMode: many});
|
tasks
|
{label: string, dateStart: string | Date, dateEnd: string | Date, expanded?: boolean, progress?: number, type?: string}[]
|
|
A getter that returns a flat structure as an array of all tasks inside the element.
Code example:
$('#myGantt').jqxGantt({});
|
taskColumns
|
{label: string, value: string}[]
|
|
Deteremines the columns that will be visible in the Task Tree. Each entry in the value of this property must be of type Object. It should contain the label and value keys. The value of label determines the column header label inside the Task Tree. The value of value determines the content of the cells in the column. It should reference a task attribute from the dataSource. By default, one column with all task labels is visible. Additional properties: - formatFunction - a function that allows to customize the content of each record in the column. The function accepts one argument - the actual label as string that is going to be inserted and must return some content.
- min - controls the min size of the column
- max - controls the max size of the column
- size - controls the actual size of the column
- customEditor - a callback that can be used to set a custom editor for the column when editing via the window. It accepts two arguments
- label - the label of the column
- value - the value of the column.
The callback must return the editor. - setCustomEditorValue - a callback that is used to set the value of the custom editor.
- getCustomEditorValue - a callback that is used to get the value of the custom editor.
Code example:
$('#myGantt').jqxGantt({taskColumns: [{ "label": "Task Name", "value": "label" }]});
|
taskFiltering
|
boolean
|
|
Determines whether the Task Table is filterable or not.
|
taskPanelMin
|
string | number
|
|
Determines the min size of the Task Panel. Used when Resource Panel is visible.
|
taskPanelSize
|
string | number
|
|
Determines the size of the Task Panel. Used when Resource Panel is visible.
|
timelineMin
|
string | number
|
|
Determines the min width of the timeline.
|
treeMin
|
string | number
|
|
Determines the min width of the task table.
|
treeSize
|
string | number
|
|
Determines the size(width) of the task table.
|
timelineHeaderFormatFunction
|
any
|
|
A format function for the Header of the Timeline. The function provides the following arguments: - date - a Date object that represets the date for the current cell.
- type - a string that represents the type of date that the cell is showing, e.g. 'month', 'week', 'day', etc.
- isHeaderDetails - a boolean that indicates whether the current cell is part of the Header Details Container or not.
- value - a string that represents the default value for the cell provided by the element.
|
tooltip
|
object
|
|
Determines whether the tooltips are enabled or not. Tooltips are available for timeline tasks, resources, connections, indicators and segments.
|
verticalScrollBarVisibility
|
string
|
|
Determines weather or not vertical scrollbar is shown.
|
view
|
string
|
|
Determines the viewing date range of the timeline. Possible values: - day - The timeline show the hours of the day.
- week - the timeline shows the days of the week.
- month - the timeline shows the days of the month.
- year - the timeline shows the months of the year.
- resource - displays the current tasks by grouping them according to the resources they have assigned. The unassigned tasks will be placed in a separate group called 'Unassigned'.
The timeline has a header section that contains the labels of each cell according to the date inside them. The header is splitted in two sections in order to give a more detailed information of the dates.
Code example:
$('#myGantt').jqxGantt({view: day});
|
yearFormat
|
string
|
|
Determines the format of the dates inside the timeline header when they represent years.
|
weekFormat
|
string
|
|
Determines the format of the dates inside the timeline header when they represent weeks.
|
theme
|
string
|
|
Sets or gets the element's visual theme.
|
|
beginUpdate
|
Event
|
|
This event is triggered when a batch update was started after executing the beginUpdate method.
|
endUpdate
|
Event
|
|
This event is triggered when a batch update was ended from after executing the endUpdate method.
|
connectionStart
|
Event
|
|
This event is triggered when the user starts connecting one task to another. This event allows to cancel the operation by calling event.preventDefault() in the event handler function.
|
connectionEnd
|
Event
|
|
This event is triggered when the user completes a connection between two tasks.
|
change
|
Event
|
|
This event is triggered when a Task is selected/unselected.
|
columnResize
|
Event
|
|
This event is triggered when a Tree column is resized. Column resizing is controled by the columnResize property.
|
closing
|
Event
|
|
This event is triggered just before the window for task editing or tooltip is closing. The closing operation can be canceled by calling event.preventDefault() in the event handler function.
|
close
|
Event
|
|
This event is triggered when the window for task editing is closed( hidden )
|
collapse
|
Event
|
|
This event is triggered when an item is collapsed.
|
dragStart
|
Event
|
|
This event is triggered when dragging of a task starts. This event allows to cancel the operation by calling event.preventDefault() in the event handler function.
|
dragEnd
|
Event
|
|
This event is triggered when dragging of a task finishes.
|
expand
|
Event
|
|
This event is triggered when an item is expanded.
|
filter
|
Event
|
|
This event is triggered when the GanttChart is filtered.
|
itemClick
|
Event
|
|
This event is triggered when a task, resource or connection is clicked inside the Timeline or the Tree columns.
|
itemInsert
|
Event
|
|
This event is triggered when a Task/Resource/Connection is inserted.
|
itemRemove
|
Event
|
|
This event is triggered when a Task/Resource/Connection is removed.
|
itemUpdate
|
Event
|
|
This event is triggered when a Task/Resource/Connection is updated.
|
opening
|
Event
|
|
This event is triggered just before the window for task editing or tooltip is opening. The opening operation can be canceled by calling event.preventDefault() in the event handler function.
|
open
|
Event
|
|
This event is triggered when the window for task editing is opened( visible ) or when the tooltip is opened.
|
progressChangeStart
|
Event
|
|
This event is triggered when the progress of a task bar starts to change as a result of user interaction. This event allows to cancel the operation by calling event.preventDefault() in the event handler function.
|
progressChangeEnd
|
Event
|
|
This event is triggered when the progress of a task is changed.
|
resizeStart
|
Event
|
|
This event is triggered when resizing of a task starts. This event allows to cancel the operation by calling event.preventDefault() in the event handler function.
|
resizeEnd
|
Event
|
|
This event is triggered when the resizing of a task finishes.
|
sort
|
Event
|
|
This event is triggered when the GanttChart is sorted by some column.
|
scrollBottomReached
|
Event
|
|
This event is triggered when the Timeline has been scrolled to the bottom.
|
scrollTopReached
|
Event
|
|
This event is triggered when the Timeline has been scrolled to the top.
|
scrollLeftReached
|
Event
|
|
This event is triggered when the Timeline has been scrolled to the beginning (horizontally).
|
scrollRightReached
|
Event
|
|
This event is triggered when the Timeline has been scrolled to the end (horizontally).
|
|
addFilter
|
Method
|
|
Adds a custom filter to a specific column (task or resource column).
Parameters |
Name |
Type |
Description |
columns |
object | object[] |
An object or an array of objects with the following syntax: - type - indicates the type of column to filter. Possible values are 'task' or 'resource'.
- value - the value of the column that must match the value attribute of a taskColumns/resourceColumns object(e.g. 'label', 'dateStart', etc).
. |
filterGroup |
object |
A JQX.Utilities.FilterGroup object. Here's an example for creating a FilterGroup object: const filterGroup = new window.JQX.Utilities.FilterGroup(), filterObject = filterGroup.createFilter('string', 'Task B', 'STARTS_WITH_CASE_SENSITIVE'); filterGroup.addFilter('or', filterObject); gantt.addFilter({ type: 'task', value: 'label' }, filterGroup); |
Return Value
None
|
clearFilters
|
Method
|
|
Clears the currently applied filters.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
clearSort
|
Method
|
|
Clears the currently applied column sorting.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
clearSelection
|
Method
|
|
Unselects all currently selected items inside the GanttChart including Tasks and Resources. It also clears the assignment highlgihters.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
clearState
|
Method
|
|
Removes a previously saved state of the element form LocalStorage according to it's id. Requires an id to be set to the element.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
clearTasks
|
Method
|
|
Removes all tasks.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
clearResources
|
Method
|
|
Removes all resources.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
createConnection
|
Method
|
|
Creates a connection between two tasks.
Parameters |
Name |
Type |
Description |
startTaskIndex |
number | string |
The id of the start task or the connection string like '2-3-0'. If the complete connections string is provided as the first argument, the rest of the method arguments are not necessary |
taskEndIndex |
number | string |
The id of the end task. |
connectionType |
number |
The type of the connection. A numeric value from 0 to 3. The connection type can be: - 0 - Start-to-Start connection.
- 1 - End-to-Start connection.
- 2 - End-to-End connection.
- 3 - Start-to-End connection.
|
lag |
number |
The connection lag in miliseconds. Used by the Auto scheduling algorithm in order allow some slack time slack time before or after the next task begins/ends. Lag is measured in miliseconds. It can be a negative (lead) or a positive (lag) number. |
Return Value
None
|
collapse
|
Method
|
|
Collapses an expanded project.
Parameters |
Name |
Type |
Description |
id |
string | number |
The id of a project item that should be collapsed. |
Return Value
None
|
beginUpdate
|
Method
|
|
Starts an update operation. This is appropriate when calling multiple methods or set multiple properties at once.
|
endUpdate
|
Method
|
|
Ends the update operation. This method will resume the rendering and will refresh the GanttChart.
|
ensureVisible
|
Method
|
|
Makes sure a Task is visible by scrolling to it.
Parameters |
Name |
Type |
Description |
taskId |
string | number |
The id of the target Task. |
Return Value
None
|
expand
|
Method
|
|
Expands a collapsed project with tasks.
Parameters |
Name |
Type |
Description |
id |
string | number |
The id of a project task that should be expanded. |
Return Value
None
|
exportData
|
Method
|
|
Exports the data of Tree of the GanttChart.
Parameters |
Name |
Type |
Description |
dataFormat |
string |
Determines the format of the exported file. Three possible values are available: |
callback |
function |
A callback that allows to format the exported data based on a condition. For additional details, refer ro the JQX Export Documentation. |
Return Value
None
|
getConnections
|
Method
|
|
Returns all existing connections. The connections are returned as objects that contain detailed information. Each object in the array has the following keys: 'id' - connection id, 'type' - connection type, 'startTaskId' - connection's start task id, 'endTaskId' - connection's end task id, 'startIndex' - connection's start task index, 'endIndex' - connection's end task index, 'lag' - lag time.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
array
|
getConnectionDetails
|
Method
|
|
Returns the connection details for the target connection which includes: startTask, endTask, startTaskId, endTaskId and type of the corresponding connection. Connection types are described in detail under the `connectionEnd` event description in this document and in a dedicated topic available on the website.
Parameters |
Name |
Type |
Description |
connectionId |
string |
A connection id. Each connection has a unique id that is assigned when a connection is created. |
Return Value
object | undefined
|
getState
|
Method
|
|
Returns a JSON representation of all tasks inside the element along with their connections and settings.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
[]
|
getItemPath
|
Method
|
|
Returns the Tree path of a task/resource. The tree path is used as task/resource id if no id is provided by the user.
Parameters |
Name |
Type |
Description |
item |
object |
A GattChartTask/GanttChartResource item object. |
Return Value
string
|
getTask
|
Method
|
|
Returns the task object that corresponds to the id/path.
Parameters |
Name |
Type |
Description |
itemId |
string | number |
The id/path of a task. |
Return Value
object
|
getTasks
|
Method
|
|
Returns an array of all GanttChart tasks.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
[]
|
getTaskIndex
|
Method
|
|
Returns the index of a task.
Parameters |
Name |
Type |
Description |
task |
object |
A GattChartTask object. |
Return Value
number
|
getTaskConnections
|
Method
|
|
Returns the connections definitions of a task.
Parameters |
Name |
Type |
Description |
taskId |
string | number | object |
A GanttChartTask object or it's id. |
Return Value
any
|
getTaskProject
|
Method
|
|
Returns the Project of a task or undefined if it does not have one.
Parameters |
Name |
Type |
Description |
task |
object |
A GantChartTask object. |
Return Value
object | undefined
|
getResource
|
Method
|
|
Returns the resource object that corresponds to the id/path.
Parameters |
Name |
Type |
Description |
itemId |
string | number |
The id/path of a resource. |
Return Value
object
|
getResources
|
Method
|
|
Returns an array of all GanttChart resources.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
[]
|
getResourceIndex
|
Method
|
|
Returns the index of a resource.
Parameters |
Name |
Type |
Description |
resource |
object |
A GanttChartResource object. |
Return Value
number
|
getResourceTasks
|
Method
|
|
Returns the tasks that are assigned to the resource.
Parameters |
Name |
Type |
Description |
resource |
object | string | number |
A GanttChartResource object or it's id. |
Return Value
array
|
getSelectedIds
|
Method
|
|
Returns the currently selected tasks/resource ids. If selection is disabled or no items are selected returns null.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
array | null
|
getSelectedTasks
|
Method
|
|
Returns the currently selected tasks.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
array | null
|
getSelectedResources
|
Method
|
|
Returns the currently selected resources.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
array | null
|
getWorkingHours
|
Method
|
|
Returns the working hours of the day as numbers.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
array
|
hideTooltip
|
Method
|
|
Hides the tooltip if it's visible.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
array
|
isWorkingDay
|
Method
|
|
Depending on the nonworkingDays property, returns true or false whether the target date is on a working day or not.
Parameters |
Name |
Type |
Description |
date |
Date |
A javascript Date object or a string/number which represents a valid JS Date. |
Return Value
None
|
loadState
|
Method
|
|
Loads a previously saved state of the element or checks LocalStorage for any saved states if no argument is passed to the method.
Parameters |
Name |
Type |
Description |
state |
[] |
An Array containing a valid structure of Gantt Chart tasks. |
Return Value
None
|
removeAllConnections
|
Method
|
|
Removes all connections between tasks.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
removeConnection
|
Method
|
|
Removes a connection between tasks. The function accepts three arguments(task's start index, end index and connection type) or one connection string argument which describes the connection.
Parameters |
Name |
Type |
Description |
startTaskIndex |
number | string |
The index of the start task or the connection string like '2-3-0. |
taskEndIndex |
number |
The index of the end task. |
connectionType |
number |
The type of the connection. A numeric value from 0 to 3. |
Return Value
object
|
removeTaskConnection
|
Method
|
|
Removes all connections of a task or between two tasks if the second argument is provided and valid.
Parameters |
Name |
Type |
Description |
taskStart |
number | string | object |
The start task object or it's id. |
taskEnd |
number | string | object |
The end task object or it's id. |
Return Value
None
|
showTooltip
|
Method
|
|
Shows the tooltip for a specific element.
Parameters |
Name |
Type |
Description |
target |
HTMLElement |
The HTMLElement that will be the target of the tooltip. |
content |
string |
Allows to set a custom content for the Tooltip. |
Return Value
None
|
saveState
|
Method
|
|
Saves the current settings of the element to LocalStorage. Requires an id to be set to the element.
Parameters |
Name |
Type |
Description |
state |
[] |
An Array containing a valid structure of Gantt Chart tasks. |
Return Value
None
|
insertTask
|
Method
|
|
Inserts a new task in the timeline. The new task can be inserted as a sub task of a project by passing the appropriate argument for the project id or as a root level item.
Parameters |
Name |
Type |
Description |
taskObject |
object |
An object describing a Gantt Chart task. |
project |
string | number | object |
A number or string that represents the id of a project (e.g. '0') or a project object definition present in the GanttChart. This parameter determines the parent project of the task that will be inserted. If null is passed as an arguemnt the new task will be inserted at root level without a parent project. |
index |
number |
The index where the new item should be inserted(e.g. 2). This index will determine the position of the newly inserted task. |
Return Value
string | number | undefined
|
updateTask
|
Method
|
|
Updates a task/project/milestone.
Parameters |
Name |
Type |
Description |
taskId |
string | number | object |
A number or string that represents the id of a task/project(e.g. '0') or the object definition of the task/project. |
taskObject |
object |
An object describing a Gantt Chart task. The properties of this object will be applied to the desired task. |
Return Value
None
|
removeTask
|
Method
|
|
Removes a task from the timeline.
Parameters |
Name |
Type |
Description |
taskId |
string | number | object |
A number or string that represents the id of a task or the actual item object. |
Return Value
None
|
insertResource
|
Method
|
|
Inserts a new resource.
Parameters |
Name |
Type |
Description |
resourceId |
string | number |
A string that represents the id of a resource or it's hierarchical position, e.g. '0' ( following jqxTree syntax), or a number that represents the index of a resource. |
resourceObject |
object |
An object describing a Gantt Chart resource. |
Return Value
None
|
updateResource
|
Method
|
|
Updates an existing resource.
Parameters |
Name |
Type |
Description |
resourceId |
string | number | object |
A string that represents the id of a resource or it's hierarchical position, e.g. '0' ( following jqxTree syntax), or a number that represents the index of a resource. |
taskObject |
object |
An object describing a Gantt Chart resource. The properties of this object will be applied to the target resource. |
Return Value
None
|
removeResource
|
Method
|
|
Removes a resource.
Parameters |
Name |
Type |
Description |
resourceId |
string | number | object |
A string that represents the id of a resource or it's hierarchical position, e.g. '0' ( following jqxTree syntax), or a number that represents the index of a resource. |
Return Value
None
|
openWindow
|
Method
|
|
Opens the popup Window for specific task to edit or to delete a connection if a connection string is passed.
Parameters |
Name |
Type |
Description |
taskId |
string | number | object |
A string or number that represents the id of a task or the task object that is going to be edited or a connection string(e.g. '2-0-0'). |
Return Value
None
|
closeWindow
|
Method
|
|
Closes an opened popup Window. The method will close any opened popup window inside the element.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
print
|
Method
|
|
Prepares the GanttChart for printing by opening the browser's Print Preview.
Parameters |
Name |
Type |
Description |
None |
null |
|
Return Value
None
|
setWorkTime
|
Method
|
|
Allows to sets the working days and hours at once.
Parameters |
Name |
Type |
Description |
settings |
{ days: (number | string | number[])[], hours: (number | string | number[])[] } |
An object definition that contains the days and hours that should be working. The days and hours can be defined as an array of numbers where each number is a day/hour, strings where each string represents a range of days/hours (e.g. '1-5' or '2:00-8:00') or nested array of numbers (e.g. [[1,5]] or [[2, 8]]) which means from 1 to 5 or 2 to 8. |
Return Value
None
|
selectTask
|
Method
|
|
Allows to select a task based on it's id.
Parameters |
Name |
Type |
Description |
id |
string | number |
The id of the task to select. |
Return Value
None
|
selectResource
|
Method
|
|
Allows to select a resource based on it's id.
Parameters |
Name |
Type |
Description |
id |
string | number |
The id of the resource to select. |
Return Value
None
|
unselectTask
|
Method
|
|
Allows to unselect a task based on it's id.
Parameters |
Name |
Type |
Description |
id |
string | number |
The id of the task to unselect. |
Return Value
None
|
unselectResource
|
Method
|
|
Allows to unselect a resource based on it's id.
Parameters |
Name |
Type |
Description |
id |
string | number |
The id of the resource to unselect. |
Return Value
None
|
unsetWorkTime
|
Method
|
|
Allows to unset previously set working time. The opposte method for setWorkingTime.
Parameters |
Name |
Type |
Description |
settings |
{ days: (number | string | number[])[], hours: (number | string | number[])[] } |
An object definition that contains the days and hours that should not be working. The days and hours can be defined as an array of numbers where each number is a day/hour, strings where each string represents a range of days/hours (e.g. '1-5' or '2:00-8:00') or nested array of numbers (e.g. [[1,5]] or [[2, 8]]) which means from 1 to 5 or 2 to 8. |
Return Value
None
|
sort
|
Method
|
|
Sorts the GanttChart tasks/resources if sortable is enabled.
Parameters |
Name |
Type |
Description |
columns |
array | undefined |
An Array of objects which determine which columns to be sorted, the sort order and the type of item to sort: task or resource. If no arguments are provided sorting will be removed. An object should have the following properties: - value - a string that represents the value of a taskColumn to sort.
- sortOrder - a string that represents the sorting order for the column: 'asc' (asscending sorting) or 'desc' (descending) are possible values.
- type - a string that represents the type of item to sort. This property determines which panel will be sorted. Two possible values: 'task', 'resource'.
|
Return Value
None
|