Resource Timeline View can display different information depending on the resourceTimelineView property:
A live JavaScript/jQuery example of jqxGantt, the jQWidgets Gantt component, with its complete source code below. It is one of 15 jqxGantt demos for jQuery.
source property – Determines the tasks that will be loaded inside the Timeline.dateEnd property – Determines a specific end date for the Timeline.dateStart property – Determines a specific starting date for the Timeline.resources property – A getter that returns a flat structure as an array of all resources inside the element.resourceColumns property – Determines the columns that will be visible in the Resource Tree.resourcePanelSize property – Determines the size of the Resource Panel.resourceTimelineFormatFunction property – A callback that can be used to customize the content of the resource Timeline cells.resourceTimelineMode property – Determines how the capacity of the resources will be visualized inside the resource timeline.tasks property – A getter that returns a flat structure as an array of all tasks inside the element.taskColumns property – Determines the columns that will be visible in the Task Tree.treeMin property – Determines the min width of the task table.view property – Determines the viewing date range of the timeline.To run it in your own page, load jqx.base.css, a theme and the library files below from npm (npm install jqwidgets-scripts) or the jsDelivr CDN, then add the markup and the script. jQuery is not required: jqxcore.js provides $.
The page loads jqx.base.css, a theme and these library files: jqxcore.js, jqxgantt.js, jqxgantt.api.js.
It also loads helper scripts of this demo site, which are not part of the library: demos.js (getWidth() and other layout helpers).
window.onload = () => {
const gantt = new jqxGantt("#gantt", {
source: [
{
label: 'Preparation',
synchronized: true,
expanded: true,
disableResources: true,
type: 'project',
tasks: [
{
label: 'Identify Objective',
dateStart: '2026-04-27',
dateEnd: '2026-05-01',
value: 5,
progress: 25,
type: 'task',
resources: [{
id: 'megan',
label: 'Megan',
maxCapacity: 8
}]
},
{
label: 'Determine Project Risks',
dateStart: '2026-05-01',
dateEnd: '2026-05-06',
value: 8,
type: 'task',
resources: 'megan'
},
{
label: 'Ensure Funding',
dateStart: '2026-05-06',
dateEnd: '2026-05-11',
progress: 15,
value: 9,
type: 'task',
resources: [{
id: 'taylor',
label: 'Taylor',
maxCapacity: 8
}]
},
{
label: 'Determine Scope',
dateStart: '2026-05-11',
dateEnd: '2026-05-14',
value: 7,
type: 'task',
resources: 'taylor'
},
{
label: 'Project Documentation',
dateStart: '2026-05-16',
dateEnd: '2026-05-23',
progress: 10,
value: 5,
type: 'task',
resources: [{
id: 'dave',
label: 'Dave',
maxCapacity: 8
}]
},
]
},
{
label: 'Planning',
synchronized: true,
expanded: true,
disableResources: true,
type: 'project',
tasks: [
{
label: 'Create Project Plan',
dateStart: '2026-05-22',
dateEnd: '2026-05-26',
progress: 55,
value: 7,
type: 'task',
resources: [{
id: 'chris',
label: 'Chris',
maxCapacity: 8
}]
},
{
label: 'Identify Resources',
dateStart: '2026-05-28',
dateEnd: '2026-05-29',
value: 6,
type: 'task',
resources: 'chris'
},
{
label: 'Determine Budget and Expenses',
dateStart: '2026-05-30',
dateEnd: '2026-06-03',
progress: 65,
value: 10,
type: 'task',
resources: 'taylor'
}
]
},
{
label: 'Deployment',
synchronized: true,
expanded: true,
disableResources: true,
type: 'project',
tasks: [
{
label: 'Analyze Performance',
dateStart: '2026-08-07',
dateEnd: '2026-08-09',
progress: 100,
value: 7,
type: 'task',
resources: 'chris'
},
{
label: 'Documentations and Tutorials',
dateStart: '2026-08-10',
dateEnd: '2026-08-16',
value: 5,
type: 'task',
resources: 'dave'
},
{
label: 'Implementation Review',
dateStart: '2026-08-17',
dateEnd: '2026-08-21',
value: 7,
type: 'task',
resources: 'megan'
},
{
label: 'Budget review',
dateStart: '2026-08-22',
dateEnd: '2026-08-27',
value: 8,
type: 'task',
resources: 'taylor'
}
]
}
],
taskColumns: [
{
label: 'Name',
value: 'label',
size: '70%'
},
{
label: 'Owner',
value: 'resources'
}
],
resourceColumns: [
{
label: 'Name',
value: 'label',
size: '70%'
},
{
label: 'Completion',
value: 'progress',
formatFunction: (data) => data + '%',
}
],
treeMin: '20%',
resourcePanelSize: '10%',
resourceTimelineMode: 'histogram',
view: 'week',
resourceTimelineFormatFunction: function (taskIndexes, resourceIndex, cellDate) {
const gantt = document.querySelector('jqx-gantt-chart'), tasks = gantt.tasks, dayOfWeek = cellDate.getDay();
let total = 0;
for (let i = 0; i < taskIndexes.length; i++) {
const taskValue = tasks[taskIndexes[i]].value || 0;
//Extra bonus points for weekends
if (dayOfWeek === 0 || dayOfWeek === 6) {
total += taskValue + 1;
}
else {
total += taskValue;
}
}
return { bonus: total, maxBonus: 10 };
}
});
};
<div>
<p>
Resource Timeline View can display different information depending on the <b>resourceTimelineView</b>
property:
</p>
</div>
<div id="gantt"></div>
<div style="position: absolute; bottom: 5px; right: 5px;">
<a href="https://www.jqwidgets.com/" alt="https://www.jqwidgets.com/"><img alt="https://www.jqwidgets.com/" title="https://www.jqwidgets.com/" src="https://www.jqwidgets.com/wp-content/design/i/logo-jqwidgets.png"></a>
</div>