Description: The Resource Timeline displays a histogram of the working time of the resources. The resources represent people that are assigned to different tasks. The resource properties capacity and maxCapacity determines the capacity and maximal capacity that a person can spend working on a task. If the capacity is above the maximum possible it is colored in red in the histogram.
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.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.timelineHeaderFormatFunction property – A format function for the Header of the Timeline.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: 'Preparing',
synchronized: true,
expanded: true,
disableResources: true,
tasks: [
{
label: 'Plan Finances',
dateStart: '2026-02-25',
dateEnd: '2026-03-01',
resources: [{
id: 'trina',
label: 'Trina',
maxCapacity: 8
}]
},
{
label: 'Find an Office',
dateStart: '2026-02-26',
dateEnd: '2026-03-01',
progress: 50,
resources: [{
id: 'michelle',
label: 'Michelle',
capacity: 4,
maxCapacity: 10,
}]
},
{
label: 'Hire Staff',
dateStart: '2026-02-26',
dateEnd: '2026-03-06',
resources: [{
id: 'melanie',
label: 'Melanie',
capacity: 8,
maxCapacity: 10,
}]
},
{
label: 'Staff Management',
dateStart: '2026-03-06',
dateEnd: '2026-03-11'
},
{
label: 'Schedule',
dateStart: '2026-03-06',
dateEnd: '2026-03-08',
resources: [{
id: 'david',
label: 'David',
maxCapacity: 8
}]
},
]
},
{
label: 'Execution',
synchronized: true,
expanded: true,
disableResources: true,
tasks: [
{
label: 'Product Vision',
dateStart: '2026-03-11',
dateEnd: '2026-03-16',
resources: [{
id: 'chris',
label: 'Chris',
maxCapacity: 12
}]
},
{
label: 'Product Development',
dateStart: '2026-03-16',
dateEnd: '2026-03-27',
resources: 'chris'
},
{
label: 'Product Release',
dateStart: '2026-03-28',
dateEnd: '2026-04-01',
resources: [{
id: 'taylor',
label: 'Taylor',
capacity: 4,
maxCapacity: 4
}]
}
]
},
{
label: 'Release',
synchronized: true,
expanded: true,
disableResources: true,
tasks: [
{
label: 'Release Management',
dateStart: '2026-04-02',
dateEnd: '2026-04-06'
},
{
label: 'Updates',
dateStart: '2026-04-11',
dateEnd: '2026-04-27',
resources: 'chris'
},
{
label: 'Upgrades',
dateStart: '2026-04-27',
dateEnd: '2026-05-28',
resources: [{
id: 'brad',
label: 'Brad'
}]
}
]
},
{
label: 'Support',
synchronized: true,
expanded: true,
disableResources: true,
tasks: [
{
label: 'QA',
dateStart: '2026-03-28',
dateEnd: '2026-04-27',
resources: 'chris'
},
{
label: 'Customer Service',
dateStart: '2026-03-28',
dateEnd: '2026-05-27',
resources: 'michelle'
},
{
label: 'Statistics and Data Analysis',
dateStart: '2026-03-28',
dateEnd: '2026-04-27'
}
]
}
],
taskColumns: [
{
label: 'Name',
value: 'label',
size: '40%'
},
{
label: 'From',
value: 'dateStart',
size: '20%'
},
{
label: 'To',
value: 'dateEnd',
size: '20%'
},
{
label: 'Owner',
value: 'resources'
}
],
resourceColumns: [
{
label: 'Name',
value: 'label',
size: '40%'
},
{
label: 'Completion',
value: 'progress',
formatFunction: (data) => data + '%',
size: '20%'
},
{
label: 'Workload',
value: 'workload',
formatFunction: (data) => data + 'h',
size: '20%'
},
{
label: 'Capacity',
value: 'capacity',
formatFunction: (data) => data + 'h',
size: '20%'
}
],
treeMin: '25%',
resourcePanelSize: '30%',
resourceTimelineMode: 'histogram',
view: 'week',
timelineHeaderFormatFunction: function (date, type, isHeaderDetailsContainer) {
const that = document.querySelector('jqx-gantt-chart');
if (isHeaderDetailsContainer) {
return date.toLocaleDateString('en', { month: 'long', year: 'numeric' });
}
else {
return date.toLocaleDateString('en', { day: 'numeric', weekday: 'long' });
}
}
})
};
<div>
<p>
<b>Description:</b> The Resource Timeline displays a histogram of the working time of the resources. The
resources represent people that are assigned to different tasks. The resource properties <b>capactiy</b> and
<b>maxCapacity</b> determines the capacity and maximal capacity that a person can spend working on a task.
If the capacity is above the maximum possible it is collered in red in the histogram.
</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>