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.
$('#myGantt').jqxGantt({adjustToNonworkingTime: true});
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.
$('#myGantt').jqxGantt({autoSchedule: true});
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.
$('#myGantt').jqxGantt({autoScheduleStrictMode: true});
Determines the scroll speed when dragging when autoScroll property is set.
$('#myGantt').jqxGantt({autoScrollStep: 10});
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.
$('#myGantt').jqxGantt({columnMenu: true});
Sets or gets the column's min width.
$('#myGantt').jqxGantt({columnMinWidth: 100px});
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.
$('#myGantt').jqxGantt({columnResize: true});
Determines resize feedback is used during column resizing. This property is applicable only when columnResize is enabled.
$('#myGantt').jqxGantt({columnResizeFeedback: true});
Gantt's current time. By default it is the today's date.
Enables/Disables the current time indicator. Current time indicator shows the current time in the appropriate view cells.
$('#myGantt').jqxGantt({currentTimeIndicator: true});
Determines the refresh interval in seconds for the currentTimeIndicator.
$('#myGantt').jqxGantt({currentTimeIndicatorInterval: 60});
Gantt export file name.
Determines the tasks that will be loaded inside the Timeline. Each item represents an object that should contain the following properties:
$('#myGantt').jqxGantt({source: [{ label: 'Task 3', dateStart: '2023-02-05', dateEnd: '2023-07-08', progress: 50, type: 'task' }]});
Determines the format of the dates in the timeline header when they represent days.
$('#myGantt').jqxGantt({dayFormat: short});
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.
$('#myGantt').jqxGantt({dateEnd: new Date(2050,0,1)});
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.
$('#myGantt').jqxGantt({dateStart: new Date(2050,0,1)});
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.
Enables or disables the element.
$('#myGantt').jqxGantt({disabled: true});
Disables auto scrolling while dragging/resizing a task bar inside the Timeline.
$('#myGantt').jqxGantt({disableAutoScroll: true});
Disables dragging of tasks in the Timeline.
$('#myGantt').jqxGantt({disableTaskDrag: true});
Disables task progress changing in the Timeline.
$('#myGantt').jqxGantt({disableTaskProgressChange: true});
Disables resizing of tasks in the Timeline.
$('#myGantt').jqxGantt({disableTaskResize: true});
Disables the selection inside the GanttChart.
$('#myGantt').jqxGantt({disableSelection: true});
Disables the task segment dragging.
$('#myGantt').jqxGantt({disableSegmentDrag: true});
Disables the task segment resizing.
$('#myGantt').jqxGantt({disableSegmentResize: true});
Disables the window editor for the GanttChart.
$('#myGantt').jqxGantt({disableWindowEditor: true});
Determines in what unit is task duration property measured.
$('#myGantt').jqxGantt({durationUnit: day});
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.
$('#myGantt').jqxGantt({filterRow: true});
Determines the view start day. Sunday is 0, Monday is 1, Saturday is 6. By default it's Sunday.
$('#myGantt').jqxGantt({firstDayOfWeek: 1});
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'.
$('#myGantt').jqxGantt({groupByResources: true});
Allows to create a custom header content for the Task Panel. The attribute accepts an HTMLTemplate element, it's id or a function.
$('#myGantt').jqxGantt({headerTemplate: template});
Determines whether the dateMarkers are visible or not.
$('#myGantt').jqxGantt({hideDateMarkers: true});
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 ).
$('#myGantt').jqxGantt({hideTimelineHeader: true});
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 ).
$('#myGantt').jqxGantt({hideTimelineHeaderDetails: true});
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 ).
$('#myGantt').jqxGantt({hideTimelineSecondHeaderDetails: true});
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.
$('#myGantt').jqxGantt({hideResourcePanel: true});
Determines weather or not horizontal scrollbar is shown.
$('#myGantt').jqxGantt({horizontalScrollBarVisibility: hidden});
Determines the format of the dates inside the timeline header when they represent hours.
$('#myGantt').jqxGantt({hourFormat: numeric});
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.
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.
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.
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:
Detetmines the maximum possible date of the Timeline.
$('#myGantt').jqxGantt({max: 2023年1月1日});
Detetmines the minimum possible date of the Timeline.
$('#myGantt').jqxGantt({min: 2000年1月1日});
Determines the format of the dates the timeline header when they represent months.
$('#myGantt').jqxGantt({monthFormat: numeric});
Determines the scale in Month view.
$('#myGantt').jqxGantt({monthScale: week});
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.
$('#myGantt').jqxGantt({nonworkingDays: [0,1]});
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.
$('#myGantt').jqxGantt({nonworkingDays: [22, 23, [0, 6]]});
A function that can be used to completly customize the task element. The function has five arguments:
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:
Determines which Tab items are visible inside the popup window. Three possible values are allowed:
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.
Determines the format of the dates the timeline header when they represent quarters.
$('#myGantt').jqxGantt({quarterFormat: long});
A getter that returns a flat structure as an array of all resources inside the element.
$('#myGantt').jqxGantt({});
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:
$('#myGantt').jqxGantt({resourceColumns: { "label": "Task Name", "value": "label" }});
Determines whether the Resource Table is filterable or not.
$('#myGantt').jqxGantt({resourceFiltering: true});
A format function that allows to re-format the group row labels when groupByResources is enabled.
Allows to create a custom header content for the Resource Panel. The attribute accepts an HTMLTemplate element, it's id or a function.
Determines the min size of the Resource Panel.
Determines the size of the Resource Panel.
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.
A callback that can be used to customize the content of the resource Timeline cells. The callback accepts three arguments:
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.
$('#myGantt').jqxGantt({resourceTimelineMode: diagram});
Determines how the resources will be displayed inside the resource Timeline.
Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
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).
$('#myGantt').jqxGantt({selectedTaskIds: ['2']});
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).
$('#myGantt').jqxGantt({selectedResourceIds: ['2']});
Enables/Disables the current time shader. If enabled all cells that represent past time will be shaded.
Shows the selection column of the Task/Resource Table. When applied a checkbox column is displayed that allows to select tasks/resources.
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.
Shows the progress label inside the progress bars of the Timeline tasks.
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.
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:
Determines whether the GanttChart can be sorted by one, more then one or no columns.
$('#myGantt').jqxGantt({sortMode: many});
A getter that returns a flat structure as an array of all tasks inside the element.
$('#myGantt').jqxGantt({});
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:
$('#myGantt').jqxGantt({taskColumns: [{ "label": "Task Name", "value": "label" }]});
Determines whether the Task Table is filterable or not.
Determines the min size of the Task Panel. Used when Resource Panel is visible.
Determines the size of the Task Panel. Used when Resource Panel is visible.
Determines the min width of the timeline.
Determines the min width of the task table.
Determines the size(width) of the task table.
A format function for the Header of the Timeline. The function provides the following arguments:
Determines whether the tooltips are enabled or not. Tooltips are available for timeline tasks, resources, connections, indicators and segments.
Determines weather or not vertical scrollbar is shown.
Determines the viewing date range of the timeline. Possible values:
$('#myGantt').jqxGantt({view: day});
Determines the format of the dates inside the timeline header when they represent years.
Determines the format of the dates inside the timeline header when they represent weeks.
Sets or gets the element's visual theme.
This event is triggered when a batch update was started after executing the beginUpdate method.
This event is triggered when a batch update was ended from after executing the endUpdate method.
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.
This event is triggered when the user completes a connection between two tasks.
This event is triggered when a Task is selected/unselected.
This event is triggered when a Tree column is resized. Column resizing is controled by the columnResize property.
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.
This event is triggered when the window for task editing is closed( hidden )
This event is triggered when an item is collapsed.
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.
This event is triggered when dragging of a task finishes.
This event is triggered when an item is expanded.
This event is triggered when the GanttChart is filtered.
This event is triggered when a task, resource or connection is clicked inside the Timeline or the Tree columns.
This event is triggered when a Task/Resource/Connection is inserted.
This event is triggered when a Task/Resource/Connection is removed.
This event is triggered when a Task/Resource/Connection is updated.
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.
This event is triggered when the window for task editing is opened( visible ) or when the tooltip is opened.
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.
This event is triggered when the progress of a task is changed.
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.
This event is triggered when the resizing of a task finishes.
This event is triggered when the GanttChart is sorted by some column.
This event is triggered when the Timeline has been scrolled to the bottom.
This event is triggered when the Timeline has been scrolled to the top.
This event is triggered when the Timeline has been scrolled to the beginning (horizontally).
This event is triggered when the Timeline has been scrolled to the end (horizontally).
Adds a custom filter to a specific column (task or resource column).
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);
Clears the currently applied filters.
Clears the currently applied column sorting.
Unselects all currently selected items inside the GanttChart including Tasks and Resources. It also clears the assignment highlgihters.
Removes a previously saved state of the element form LocalStorage according to it's id. Requires an id to be set to the element.
Removes all tasks.
Removes all resources.
Creates a connection between two tasks.
Collapses an expanded project.
Starts an update operation. This is appropriate when calling multiple methods or set multiple properties at once.
Ends the update operation. This method will resume the rendering and will refresh the GanttChart.
Makes sure a Task is visible by scrolling to it.
Expands a collapsed project with tasks.
Exports the data of Tree of the GanttChart.
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.
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.
Returns a JSON representation of all tasks inside the element along with their connections and settings.
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.
Returns the task object that corresponds to the id/path.
Returns an array of all GanttChart tasks.
Returns the index of a task.
Returns the connections definitions of a task.
Returns the Project of a task or undefined if it does not have one.
Returns the resource object that corresponds to the id/path.
Returns an array of all GanttChart resources.
Returns the index of a resource.
Returns the tasks that are assigned to the resource.
Returns the currently selected tasks/resource ids. If selection is disabled or no items are selected returns null.
Returns the currently selected tasks.
Returns the currently selected resources.
Returns the working hours of the day as numbers.
Hides the tooltip if it's visible.
Depending on the nonworkingDays property, returns true or false whether the target date is on a working day or not.
Loads a previously saved state of the element or checks LocalStorage for any saved states if no argument is passed to the method.
Removes all connections between tasks.
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.
Removes all connections of a task or between two tasks if the second argument is provided and valid.
Shows the tooltip for a specific element.
Saves the current settings of the element to LocalStorage. Requires an id to be set to the element.
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.
Updates a task/project/milestone.
Removes a task from the timeline.
Inserts a new resource.
Updates an existing resource.
Removes a resource.
Opens the popup Window for specific task to edit or to delete a connection if a connection string is passed.
Closes an opened popup Window. The method will close any opened popup window inside the element.
Prepares the GanttChart for printing by opening the browser's Print Preview.
Allows to sets the working days and hours at once.
Allows to select a task based on it's id.
Allows to select a resource based on it's id.
Allows to unselect a task based on it's id.
Allows to unselect a resource based on it's id.
Allows to unset previously set working time. The opposte method for setWorkingTime.
Sorts the GanttChart tasks/resources if sortable is enabled.